[Asterisk-code-review] http.c: Fix http header send content. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Oct 24 17:51:05 CDT 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/6880 )

Change subject: http.c: Fix http header send content.
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/6880/3/main/http.c
File main/http.c:

https://gerrit.asterisk.org/#/c/6880/3/main/http.c@534
PS3, Line 534: 	}
             : 
             : 	/* send content */
             : 	if (!close_connection && send_content && fd) {
This portion of the code needs to be changed to fit this structure:

if (fprintf(ser->f, blah blah) <= 0) {
  ...
} else if (send_content && fd) {
  /* send file content */
  ...
}

This finding change also needs to be done in v15 for the same reason.  The close_connection is being used incorrectly in the current send context if test.  We may send the HTTP response header but not send the fd file contents because we are supposed to close the connection after sending the response.



-- 
To view, visit https://gerrit.asterisk.org/6880
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I8816d2d8f80f4fefc6dcae4b5fdfc97f1e46496d
Gerrit-Change-Number: 6880
Gerrit-PatchSet: 3
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 24 Oct 2017 22:51:05 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171024/5fab5128/attachment.html>


More information about the asterisk-code-review mailing list