Mercurial > hg > nginx
comparison src/http/ngx_http_event.c @ 68:d549fdc17d7e
nginx-0.0.1-2003-03-12-20:32:22 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 Mar 2003 17:32:22 +0000 |
parents | 5a7d1aaa1618 |
children | e43f406e4525 |
comparison
equal
deleted
inserted
replaced
67:5a7d1aaa1618 | 68:d549fdc17d7e |
---|---|
164 | 164 |
165 r->pipeline = c->pipeline; | 165 r->pipeline = c->pipeline; |
166 r->header_in = c->buffer; | 166 r->header_in = c->buffer; |
167 | 167 |
168 ngx_test_null(r->pool, ngx_create_pool(ngx_http_request_pool_size, ev->log), | 168 ngx_test_null(r->pool, ngx_create_pool(ngx_http_request_pool_size, ev->log), |
169 ngx_http_close_request(r)); | 169 NGX_ERROR); |
170 | 170 |
171 ngx_test_null(r->ctx, | 171 ngx_test_null(r->ctx, |
172 ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module), | 172 ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module), |
173 ngx_http_close_request(r)); | 173 ngx_http_close_request(r)); |
174 | 174 |
933 | 933 |
934 c = (ngx_connection_t *) ev->data; | 934 c = (ngx_connection_t *) ev->data; |
935 | 935 |
936 ngx_log_debug(ev->log, "http keepalive handler"); | 936 ngx_log_debug(ev->log, "http keepalive handler"); |
937 | 937 |
938 if (ev->timedout) | 938 if (ev->timedout) { |
939 return NGX_DONE; | 939 return NGX_DONE; |
940 } | |
940 | 941 |
941 /* MSIE closes keepalive connection with RST flag | 942 /* MSIE closes keepalive connection with RST flag |
942 so we ignore ECONNRESET here */ | 943 so we ignore ECONNRESET here */ |
943 | 944 |
944 ev->ignore_econnreset = 1; | 945 ev->ignore_econnreset = 1; |
945 ngx_set_socket_errno(0); | 946 ngx_set_socket_errno(0); |
946 n = ngx_event_recv(c, c->buffer->last, c->buffer->end - c->buffer->last); | 947 n = ngx_event_recv(c, c->buffer->last, c->buffer->end - c->buffer->last); |
947 ev->ignore_econnreset = 0; | 948 ev->ignore_econnreset = 0; |
948 | 949 |
949 if (n == NGX_AGAIN || n == NGX_ERROR) | 950 if (n == NGX_AGAIN || n == NGX_ERROR) { |
950 return n; | 951 return n; |
952 } | |
951 | 953 |
952 ctx = (ngx_http_log_ctx_t *) ev->log->data; | 954 ctx = (ngx_http_log_ctx_t *) ev->log->data; |
953 ev->log->handler = NULL; | 955 ev->log->handler = NULL; |
954 | 956 |
955 if (n == 0) { | 957 if (n == 0) { |