[asterisk-dev] [Code Review] 3691: HTTP: Add persistent connection support.

opticron reviewboard at asterisk.org
Tue Jul 1 12:34:02 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3691/#review12407
-----------------------------------------------------------



/branches/12/include/asterisk/http.h
<https://reviewboard.asterisk.org/r/3691/#comment22639>

    The actual meaning of the integer return value should be detailed here now that it is being used.



/branches/12/main/http.c
<https://reviewboard.asterisk.org/r/3691/#comment22640>

    request->close_on_completion will always be 0 in this branch.



/branches/12/main/http.c
<https://reviewboard.asterisk.org/r/3691/#comment22645>

    This should use \return or should include a value such as non-zero after \retval.



/branches/12/main/http.c
<https://reviewboard.asterisk.org/r/3691/#comment22648>

    There is a non-trivial amount of code duplicated between this function and ast_http_get_contents. At a minimum, the trailer discard should be pulled out into a shared function.


- opticron


On June 30, 2014, 9:11 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3691/
> -----------------------------------------------------------
> 
> (Updated June 30, 2014, 9:11 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23552
>     https://issues.asterisk.org/jira/browse/ASTERISK-23552
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Persistent HTTP connection support is needed due to the increased usage of
> the Asterisk core HTTP transport and the frequency at which REST API calls
> are going to be issued.
> 
> * Add http.conf session_keep_alive option to enable persistent
> connections.
> 
> * Parse and discard optional chunked body extension information and
> trailing request headers.
> 
> * Increased the maximum application/json and
> application/x-www-form-urlencoded body size allowed to 4k.  The previous
> 1k was kind of small.
> 
> * Removed a couple inlined versions of ast_http_manid_from_vars() by
> calling the function.  manager.c:generic_http_callback() and
> res_http_post.c:http_post_callback()
> 
> * Add missing va_end() in ast_ari_response_error().
> 
> * Eliminated unnecessary RAII_VAR() use in http.c:auth_create().
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/res_phoneprov.c 417704 
>   /branches/12/res/res_http_websocket.c 417704 
>   /branches/12/res/res_http_post.c 417704 
>   /branches/12/res/res_ari.c 417704 
>   /branches/12/main/tcptls.c 417704 
>   /branches/12/main/manager.c 417704 
>   /branches/12/main/http.c 417704 
>   /branches/12/include/asterisk/tcptls.h 417704 
>   /branches/12/include/asterisk/http.h 417704 
>   /branches/12/configs/http.conf.sample 417704 
>   /branches/12/UPGRADE.txt 417704 
> 
> Diff: https://reviewboard.asterisk.org/r/3691/diff/
> 
> 
> Testing
> -------
> 
> Added debug messages showing when HTTP connections were opened and closed.
> Performed the following operations:
> http://127.0.0.1:8088/static/ajamdemo.html
> https://127.0.0.1:8088/static/ajamdemo.html
> http://127.0.0.1:8088/static/mantest.html
> https://127.0.0.1:8088/static/mantest.html
> 
> Had sgalarneau perform ARI queries and actions with node.js.
> 
> The opened HTTP connections remained open and processed repeated requests until they idle timed out.
> 
> Performed the following get:
> GET /httpstatus HTTP/1.1
> Connection: close
> 
> Observed that the connection closed as requested when completed.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140701/43c68f6b/attachment.html>


More information about the asterisk-dev mailing list