comparison src/http/ngx_http_request.c @ 318:fc223117327f NGINX_0_6_3

nginx 0.6.3 *) Feature: the "proxy_store" and "fastcgi_store" directives. *) Bugfix: a segmentation fault might occur in worker process if the "auth_http_header" directive was used. Thanks to Maxim Dounin. *) Bugfix: a segmentation fault occurred in worker process if the CRAM-MD5 authentication method was used, but it was not enabled. *) Bugfix: a segmentation fault might occur in worker process when the HTTPS protocol was used in the "proxy_pass" directive. *) Bugfix: a segmentation fault might occur in worker process if the eventport method was used. *) Bugfix: the "proxy_ignore_client_abort" and "fastcgi_ignore_client_abort" directives did not work; bug appeared in 0.5.13.
author Igor Sysoev <http://sysoev.ru>
date Thu, 12 Jul 2007 00:00:00 +0400
parents 429900ca25ee
children 9fc4ab6673f9
comparison
equal deleted inserted replaced
317:fcdf0e42c859 318:fc223117327f
32 static void ngx_http_request_handler(ngx_event_t *ev); 32 static void ngx_http_request_handler(ngx_event_t *ev);
33 static ngx_int_t ngx_http_set_write_handler(ngx_http_request_t *r); 33 static ngx_int_t ngx_http_set_write_handler(ngx_http_request_t *r);
34 static void ngx_http_writer(ngx_http_request_t *r); 34 static void ngx_http_writer(ngx_http_request_t *r);
35 35
36 static void ngx_http_block_read(ngx_http_request_t *r); 36 static void ngx_http_block_read(ngx_http_request_t *r);
37 static void ngx_http_test_read(ngx_http_request_t *r);
37 static void ngx_http_set_keepalive(ngx_http_request_t *r); 38 static void ngx_http_set_keepalive(ngx_http_request_t *r);
38 static void ngx_http_keepalive_handler(ngx_event_t *ev); 39 static void ngx_http_keepalive_handler(ngx_event_t *ev);
39 static void ngx_http_set_lingering_close(ngx_http_request_t *r); 40 static void ngx_http_set_lingering_close(ngx_http_request_t *r);
40 static void ngx_http_lingering_close_handler(ngx_event_t *ev); 41 static void ngx_http_lingering_close_handler(ngx_event_t *ev);
41 static ngx_int_t ngx_http_post_action(ngx_http_request_t *r); 42 static ngx_int_t ngx_http_post_action(ngx_http_request_t *r);
1699 ngx_event_t *wev; 1700 ngx_event_t *wev;
1700 ngx_http_core_loc_conf_t *clcf; 1701 ngx_http_core_loc_conf_t *clcf;
1701 1702
1702 r->http_state = NGX_HTTP_WRITING_REQUEST_STATE; 1703 r->http_state = NGX_HTTP_WRITING_REQUEST_STATE;
1703 1704
1704 r->read_event_handler = ngx_http_block_read; 1705 r->read_event_handler = ngx_http_test_read;
1705 r->write_event_handler = ngx_http_writer; 1706 r->write_event_handler = ngx_http_writer;
1706 1707
1707 wev = r->connection->write; 1708 wev = r->connection->write;
1708 1709
1709 if (wev->ready && wev->delayed) { 1710 if (wev->ready && wev->delayed) {
1812 1813
1813 1814
1814 static void 1815 static void
1815 ngx_http_block_read(ngx_http_request_t *r) 1816 ngx_http_block_read(ngx_http_request_t *r)
1816 { 1817 {
1818 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1819 "http read blocked");
1820
1821 /* aio does not call this handler */
1822
1823 if ((ngx_event_flags & NGX_USE_LEVEL_EVENT)
1824 && r->connection->read->active)
1825 {
1826 if (ngx_del_event(r->connection->read, NGX_READ_EVENT, 0)
1827 == NGX_ERROR)
1828 {
1829 ngx_http_close_request(r, 0);
1830 }
1831 }
1832 }
1833
1834
1835 static void
1836 ngx_http_test_read(ngx_http_request_t *r)
1837 {
1817 int n; 1838 int n;
1818 char buf[1]; 1839 char buf[1];
1819 ngx_err_t err; 1840 ngx_err_t err;
1820 ngx_event_t *rev; 1841 ngx_event_t *rev;
1821 ngx_connection_t *c; 1842 ngx_connection_t *c;
1822 1843
1823 c = r->connection; 1844 c = r->connection;
1824 rev = c->read; 1845 rev = c->read;
1825 1846
1826 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http read blocked"); 1847 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http test read");
1827 1848
1828 #if (NGX_HAVE_KQUEUE) 1849 #if (NGX_HAVE_KQUEUE)
1829 1850
1830 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { 1851 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
1831 1852