On Thu, Jun 19, 2014 at 9:23 PM, Brian Wolff bawolff@gmail.com wrote:
What about the content-length header? I believe that's included with POST requests even when using application/x-www-form-urlencoded form.
I suggest people in this thread read section 4.4 of RFC 2616.
There is no situation in which an HTTP request can be "cut off" such that part of the query goes missing. Assuming you are using a compliant web server, the Content-Length header is basically required for request bodies (unless you're doing chunked encoding or something).
Try right now submitting a POST request without a Content-Length header to Wikipedia. It results in a 400. Additionally, if you send an incorrect header, it will either wait until timeout if it's too long or give 400 if it's too short.
Like Daniel said, the only situation that is possible is some sort of buffer issue, where there is a client-side application logic error that causes the incorrect request to be sent. But this is not really MediaWiki's problem, and client's should be using the Content-MD5 header (or whatever the bastardized MediaWiki version is, since MW doesn't actually support HTTP) if they really want to ensure data integrity.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science