[asterisk-app-dev] [HTTP module] Max content length - repercussions on ARI service

Claudiu Olteanu olteanu.claudiu at ymail.com
Thu Mar 5 03:32:20 CST 2015


Hi there,

I was wondering why there is a maximum content length for the body of an application/JSON.

I ask this because using the ARI service you have the possibility to raise an event to a user or to send a message to an endpoint and to attach some information to the body content using the variables parameter. 

If the body content length is greater than 4096, then the request will fail because it tries to get the body of the HTTP request using the ast_http_get_contents method which has this limitation. This limitation doesn't happen when you want to retrieve the information about all the endpoints from the system using a GET HTTP request to /endpointsURI, even if the content length of the response is greater than 4096. 

Therefore I have the following questions:
1. Was this the desired design? If this is the case I believe that it would be better to write this limitation on the ARIdocumentation.
2. Is it safe to extent the value of MAX_CONTENT_LENGTH macro definition?
3. Should I split the content of the variables parameter in smaller chunks?
4. Is there another workaround for this kind of situation?

Happy hacking,
Claudiu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20150305/4c415301/attachment.html>


More information about the asterisk-app-dev mailing list