SUMMARY: Minor change in comment for SetMaxContentLenght in upnp.h
This is a follow up from issue 6 in tracker id 3056713: calling UpnpSetMaxContentLength() by passing '0' disables the content length checking. This is useful for developing some prototype applications that deal with a lot of XML/SOAP data, and for debugging. The corresponding c file change is already in the pupnp tree. Copy/pasting the relevant block of code here for clarity: In upnp/src/genlib/net/http/httpreadwrite.c: if (g_maxContentLength > 0 && parser->content_length > (unsigned int)g_maxContentLength) { *http_error_code = HTTP_REQ_ENTITY_TOO_LARGE; line = __LINE__; ret = UPNP_E_OUTOF_BOUNDS; goto ExitFunction; } This block of code checks only does the bounds check if g_maxContentLength > 0, and it's only place g_maxContentLength is checked. Attached is a patch against the latest sources.
This commit is contained in:
parent
82a6e9f0cc
commit
7f1e164a5a
@ -1125,6 +1125,8 @@ EXPORT_SPEC int UpnpSetContentLength(
|
|||||||
* behaviour if the size of the incoming SOAP message exceeds the memory that
|
* behaviour if the size of the incoming SOAP message exceeds the memory that
|
||||||
* device can allocate.
|
* device can allocate.
|
||||||
*
|
*
|
||||||
|
* If set to 0 then checking will be disabled.
|
||||||
|
*
|
||||||
* The default maximum content-length is \c DEFAULT_SOAP_CONTENT_LENGTH
|
* The default maximum content-length is \c DEFAULT_SOAP_CONTENT_LENGTH
|
||||||
* = 16K bytes.
|
* = 16K bytes.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user