Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does Internet Explorer not send HTTP post body on Ajax call after failure?
    primarykey
    data
    text
    <p>We are able to reliably recreate the following scenario:</p> <ol> <li>Create a small HTML page that makes AJAX requests to a server (using HTTP POST)</li> <li>Disconnect from the network and reconnect</li> <li>Monitor the packets that IE generates after the failure</li> </ol> <p>After a failed network connection, IE makes the next AJAX request but only sends the <strong>HTTP header</strong> (not the body) when doing the HTTP post. This causes all sorts of problems on the server as it is only a partial request. Google this issue with Bing and you'll find lots of people complaining about "random server errors" using AJAX or unexplained AJAX failures. </p> <p>We know that IE (unlike most other browsers) always sends an HTTP POST as TWO TCP/IP packets. The header and body is sent separately. In the case directly after a failure, <strong>IE only sends the header</strong>.</p> <p>So my question is - why does it behave this way? It seems wrong based on the HTTP spec and other browsers don't behave this way. Is it simply a bug? Surely this creates havoc in any serious AJAX based Web application.</p> <p><strong>Reference information:</strong></p> <p>There is a similar problem, triggered by HTTP keep-alive timeouts that are shorter than 1 minute and is documented here:</p> <p><a href="http://us.generation-nt.com/xmlhttprequest-post-sometimes-fails-when-server-using-keep-aliv-help-188813541.html" rel="noreferrer">http://us.generation-nt.com/xmlhttprequest-post-sometimes-fails-when-server-using-keep-aliv-help-188813541.html</a></p> <p><a href="http://support.microsoft.com/default.aspx?kbid=831167" rel="noreferrer">http://support.microsoft.com/default.aspx?kbid=831167</a></p> <p>Here are the before and after failure packet captures:</p> <p>Notice how the HTTP Header and Payload is sent <a href="http://img827.imageshack.us/i/beforee.png/" rel="noreferrer">http://img827.imageshack.us/i/beforee.png/</a></p> <p>After a failure, notice how only the Header is sent. IE <em>never</em> sends the payload and the server eventually responds with a Timeout. <a href="http://img203.imageshack.us/i/retryt.png/" rel="noreferrer">http://img203.imageshack.us/i/retryt.png/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload