Re: [HTTP module] Max content length - repercussions on ARI service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Claudiu Olteanu wrote:
Hi there,

Kia ora,

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

Looks like it was done to just provide a sane maximum to prevent an excessively large amount.

I ask this because using the ARIservice 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 variablesparameter.

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_contentsmethod 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 GETHTTP 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.

It was intentional, but can be revisited.

2. Is it safe to extent the value of MAX_CONTENT_LENGTHmacro definition?

Should be fine.

3. Should I split the content of the variablesparameter in smaller chunks?

Chunking doesn't help as it's the total content length, not of each individual chunk. (If you are referring to a chunked body).

4. Is there another workaround for this kind of situation?

Nothing immediately springs to mind.

Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev




[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux