Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r5103 - trunk/src/http

Anonymous User
March 07, 2013 12:42PM
Author: vbart
Date: 2013-03-07 17:41:40 +0000 (Thu, 07 Mar 2013)
New Revision: 5103
URL: http://trac.nginx.org/nginx/changeset/5103/nginx

Log:
Use "client_header_timeout" for all requests in a connection.

Previously, only the first request in a connection used timeout
value from the "client_header_timeout" directive while reading
header. All subsequent requests used "keepalive_timeout" for
that.

It happened because timeout of the read event was set to the
value of "keepalive_timeout" in ngx_http_set_keepalive(), but
was not removed when the next request arrived.


Modified:
trunk/src/http/ngx_http_request.c

Modified: trunk/src/http/ngx_http_request.c
===================================================================
--- trunk/src/http/ngx_http_request.c 2013-03-07 17:21:50 UTC (rev 5102)
+++ trunk/src/http/ngx_http_request.c 2013-03-07 17:41:40 UTC (rev 5103)
@@ -2736,8 +2736,6 @@

c->data = hc;

- ngx_add_timer(rev, clcf->keepalive_timeout);
-
if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_connection(c);
return;
@@ -2753,6 +2751,10 @@
hc->pipeline = 1;
c->log->action = "reading client pipelined request line";

+ if (rev->timer_set) {
+ ngx_del_timer(rev);
+ }
+
rev->handler = ngx_http_init_request;
ngx_post_event(rev, &ngx_posted_events);
return;
@@ -2872,6 +2874,8 @@
c->idle = 1;
ngx_reusable_connection(c, 1);

+ ngx_add_timer(rev, clcf->keepalive_timeout);
+
if (rev->ready) {
ngx_post_event(rev, &ngx_posted_events);
}
@@ -2993,6 +2997,8 @@
c->idle = 0;
ngx_reusable_connection(c, 0);

+ ngx_del_timer(rev);
+
ngx_http_init_request(rev);
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r5103 - trunk/src/http

Anonymous User 730 March 07, 2013 12:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 243
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready