[HTTP module] Max content length - repercussions on ARI

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 /endpoints URI, 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 ARI documentation.
  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,


You should probably post this to the mailing list here:
lists.digium.com/cgi-bin/mailman … sk-app-dev

more of the people using ARI are there, rather than here.