Posting a Body longer than 32767 characters - WeOnlyDo Discussion board

Posting a Body longer than 32767 characters (General questions)

by wleader, Tuesday, July 17, 2007, 18:42 (6339 days ago)


When I use the wodHttpDlx component via COM and I create a request with a body longer than 32767 characters, the Post method never returns. If the request body is shorter than this, there are no problems. When logging is turned on, the log stops at the 32767th character of the body. Normally any post would be for a short piece of data like submitting a form, but when uploading a file larger that 32KB, the request body can get long enough to trigger this problem.

Since 32767 is the upper limit on a signed 16 bit integer, I suspect that there is a loop in the code that copies the body data from a buffer to the socket, and that the iterator of the loop is a 16 bit integer. When it gets to the 32767th character, the iterator overflows.

I can provide a sample that reproduces this behavior if needed.


Complete thread: