On 6/19/14, Gergo Tisza gtisza@wikimedia.org wrote:
On Thu, Jun 19, 2014 at 6:27 AM, Bartosz DziewoĆski matma.rex@gmail.com wrote:
I'm reasonably sure that the HTTP and HTTPS protocols are smart enough to recognize "cut off" requests, and that any servers whatsoever are smart enough to implement this behavior.
Actually not. multipart/form-data POST requests have an end marker, but application/x-www-form-urlencoded requests have not - they use the same param1=foo¶m2=bar format GET URLs do, there is no way to tell if that is cut off. Lower-level protocols will deal with issues like lost packets or network disconnection, but if the body of the request is truncated because of an error in the sending HTTP library, like using a buffer that is too small, there is no way the server could detect that. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
What about the content-length header? I believe that's included with POST requests even when using application/x-www-form-urlencoded form.
Although I have noticed we do have code in EditPage.php to detect this situation for normal edits, so I guess it must happen on occasion.
--bawolff