post_action, just send http request, not fcgi - more questions + post_action bug?
Rob Mueller
robm at fastmail.fm
Tue Mar 18 08:32:57 MSK 2008
> But rather than actually keeping the connection open, it immediately
> closes it. This seems to be annoying some clients.
>
> Again, if you remove the post_action call, it does keep the connection
> open fine.
Not being an expert on nginx code, for now, I've added the patch below to my
nginx install. Basically it just stops the post_action handler being called
for anything but 200 or 206 responses, which is a bit evil, but seems to fix
the disconnct issue. Hmmm, I didn't really look into this very hard though,
it might be causing a memory leak as well, I think I need to double check
that...
If you have a moment Igor, some idea of what the proper fix for this would
be would be appreciated.
Rob
-----
--- nginx-0.5.35.orig/src/http/ngx_http_request.c 2008-03-18
01:39:29.000000000 +0000
+++ nginx-0.5.35/src/http/ngx_http_request.c 2008-03-18
01:40:28.000000000 +0000
@@ -1710,7 +1710,7 @@ ngx_http_finalize_request(ngx_http_reque
r->request_complete = 1;
}
- if (ngx_http_post_action(r) == NGX_OK) {
+ if ((r->headers_out.status == NGX_HTTP_OK || r->headers_out.status ==
NGX_HTTP_PARTIAL_CONTENT) && ngx_http_post_action(r) == NGX_OK) {
return;
}
More information about the nginx
mailing list