[Asterisk-code-review] http.c: Support separated HTTP request (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jan 10 21:32:44 CST 2019


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/10869 )

Change subject: http.c: Support separated HTTP request
......................................................................


Patch Set 4:

> Sorry for being dense.  I am just not understanding clearly the
 > terminology being used. I know I still have lots to learn.  I tried
 > looking up "seperated HTTP request" and am not finding anything.  I
 > was just trying to clarify what you meant rather than assuming what
 > it is that you are doing.  If I understand correctly, you are
 > trying to make sure Asterisk receives the entire body before moving
 > on.  Is that correct?
 > 
 > There is a comment that the stream is in exclusive mode.  Will this
 > change have side affects when receiving the message body slowly? 
 > Especially if you are increasing the acceptable limit on the
 > content's length.

When the message body is received slowly this will cause the current thread to wait for the message body to be received.  That shouldn't be an issue since the current thread should below to that specific HTTP connection.  So if we have 'Content-Length: 8192' we might only receive 4k of the body in one call to ast_iostream_read, the other 4k in the next call.

>From what I can tell the exclusive mode only causes ast_iostream_read to retry if zero bytes have been received.  It does not cause ast_iostream_read to keep trying if we received less than requested.  Currently if we're reading from a slower connection if we don't get the entire body in the first read the HTTP request is failed and we close the connection.


-- 
To view, visit https://gerrit.asterisk.org/10869
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I48a401aa64a21c3b37bf3cb4e0486d64b7dd8aa1
Gerrit-Change-Number: 10869
Gerrit-PatchSet: 4
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Michael L. Young <elgueromexicano at gmail.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-Comment-Date: Fri, 11 Jan 2019 03:32:44 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190110/a086ee06/attachment.html>


More information about the asterisk-code-review mailing list