comparison src/http/ngx_http_request.c @ 286:5bef04fc3fd5 NGINX_0_5_13

nginx 0.5.13 *) Feature: the COPY and MOVE methods. *) Bugfix: the ngx_http_realip_module set garbage for requests passed via keep-alive connection. *) Bugfix: nginx did not work on big-endian 64-bit Linux. Thanks to Andrei Nigmatulin. *) Bugfix: now when IMAP/POP3 proxy receives too long command it closes the connection right away, but not after timeout. *) Bugfix: if the "epoll" method was used and a client closed a connection prematurely, then nginx closed the connection after a send timeout only. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc and ppc; bug appeared in 0.5.8.
author Igor Sysoev <http://sysoev.ru>
date Mon, 19 Feb 2007 00:00:00 +0300
parents 675a39fd14cd
children f745bf973510
comparison
equal deleted inserted replaced
285:0e505c8b6528 286:5bef04fc3fd5
1283 return NGX_ERROR; 1283 return NGX_ERROR;
1284 } 1284 }
1285 1285
1286 if (r->headers_in.connection) { 1286 if (r->headers_in.connection) {
1287 if (r->headers_in.connection->value.len == 5 1287 if (r->headers_in.connection->value.len == 5
1288 && ngx_strcasecmp(r->headers_in.connection->value.data, "close") 1288 && ngx_strcasecmp(r->headers_in.connection->value.data,
1289 (u_char *) "close")
1289 == 0) 1290 == 0)
1290 { 1291 {
1291 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; 1292 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
1292 1293
1293 } else if (r->headers_in.connection->value.len == 10 1294 } else if (r->headers_in.connection->value.len == 10
1294 && ngx_strcasecmp(r->headers_in.connection->value.data, 1295 && ngx_strcasecmp(r->headers_in.connection->value.data,
1295 "keep-alive") == 0) 1296 (u_char *) "keep-alive")
1297 == 0)
1296 { 1298 {
1297 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE; 1299 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE;
1298 1300
1299 if (r->headers_in.keep_alive) { 1301 if (r->headers_in.keep_alive) {
1300 r->headers_in.keep_alive_n = 1302 r->headers_in.keep_alive_n =
1649 ngx_event_t *wev; 1651 ngx_event_t *wev;
1650 ngx_http_core_loc_conf_t *clcf; 1652 ngx_http_core_loc_conf_t *clcf;
1651 1653
1652 r->http_state = NGX_HTTP_WRITING_REQUEST_STATE; 1654 r->http_state = NGX_HTTP_WRITING_REQUEST_STATE;
1653 1655
1656 r->read_event_handler = ngx_http_block_read;
1654 r->write_event_handler = ngx_http_writer; 1657 r->write_event_handler = ngx_http_writer;
1655 1658
1656 wev = r->connection->write; 1659 wev = r->connection->write;
1657 1660
1658 if (wev->ready && wev->delayed) { 1661 if (wev->ready && wev->delayed) {
1829 } 1832 }
1830 1833
1831 ngx_log_error(NGX_LOG_INFO, c->log, err, 1834 ngx_log_error(NGX_LOG_INFO, c->log, err,
1832 "client closed prematurely connection"); 1835 "client closed prematurely connection");
1833 1836
1834 ngx_http_close_request(r, 0); 1837 ngx_http_finalize_request(r, 0);
1835
1836 return;
1837 } 1838 }
1838 1839
1839 1840
1840 static void 1841 static void
1841 ngx_http_set_keepalive(ngx_http_request_t *r) 1842 ngx_http_set_keepalive(ngx_http_request_t *r)