When testing my webservice I saw that POST data could be lost: the OnPostedData handler of the http server component is never called, despite the hgAcceptData set in OnPostDocument. I have reproduced this issue with a simple http server, based on the WebServ sample The use case: repeated sequential posts sent with a indy client component, with a basic query string (56 bytes long)
Most POST are correctly handled, but some are simply dropped.

In ICS code, the issue leads to the THttpConnection.ConnectionDataSent method:
on line 4565 (v8 gold release), FState is reset to hcRequest
On the following line, the comment { no stream usually means just a header string has been sent } is wrong in this case, a querystring has been sent. FDocSize equals 0 at this time. Next, in THttpConnection.ParseRequest, the FMethod is then initialized with the content of the query string (the above 56 bytes)

I'm new to ICS so I was not able to push further the analysis.
No clue if this a bug, I could simply provide sample code to reproduce the issue.
Any advise welcome,

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to