keepalive support on msie for POST requests

foobie nginx-forum at
Tue Aug 4 16:00:38 MSD 2009


Looking into aol pagetest reports from and it shows that our application suffers from prematurely-closed keepalive connections in IE - whenever our RIA makes a POST request, the response contains a connection: close header. We use nginx as a load-balancing proxy, and it handles keepalives between the client and nginx.

I narrowed the problem down to this code in src/http/ngx_http_core_module.c

if (r->keepalive && r->headers_in.msie && r->method == NGX_HTTP_POST) {

             * MSIE may wait for some time if an response for
             * a POST request was sent over a keepalive connection

             r->keepalive = 0;

then found the thread at about this issue.

It looks like the msie bug was fixed in 2004 ( and should not affect ie7 or ie8.

Is it possible to update nginx to allow POST keepalives for ie7/8 rather than penalise all msie users for a bug that was fixed 5 years ago?

I propose using headers_in.msie6 (which matches ie 6 and below) rather than the generic headers_in.msie:

if (r->keepalive && r->headers_in.msie6 && r->method == NGX_HTTP_POST) {


Posted at Nginx Forum:,4718,4718#msg-4718

More information about the nginx mailing list