Mercurial > hg > nginx-quic
comparison src/http/ngx_http_request.c @ 1283:a3f8d6d17b94
proxy_ignore_client_abort, fastcgi_ignore_client_abort, and so on were
broken by r1111
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 10 Jul 2007 20:53:45 +0000 |
parents | 8ef04207c84f |
children | 202cae9a0c2b |
comparison
equal
deleted
inserted
replaced
1281:163354352dde | 1283:a3f8d6d17b94 |
---|---|
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 |