aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-10-21 07:47:21 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-10-21 07:47:21 +0000
commit9760a1336f0eb4057b6e2ccdd4b0145087102b17 (patch)
treedcaf614b7b3181c53eca9cbe7ff3c37f850c2804 /src/http/ngx_http_core_module.c
parent54276be80c35fcff04da8cd129452995e9ba8ba5 (diff)
downloadnginx-9760a1336f0eb4057b6e2ccdd4b0145087102b17.tar.gz
nginx-9760a1336f0eb4057b6e2ccdd4b0145087102b17.zip
nginx-0.0.1-2003-10-21-11:47:21 import
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 1eee5725f..4e3b43c5e 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -207,13 +207,31 @@ void ngx_http_handler(ngx_http_request_t *r)
lcx = r->connection->log->data;
lcx->action = NULL;
+ /* STUB */
r->keepalive = 1;
+ if (r->headers_in.connection) {
+ if (r->headers_in.connection->value.len == 5
+ && ngx_strcasecmp(r->headers_in.connection->value.data, "close")
+ == 0)
+ {
+ r->keepalive = 0;
+ }
+ }
+
+#if 0
+ /* TEST STUB */ r->keepalive = 0;
+#endif
if (r->headers_in.content_length_n > 0) {
r->lingering_close = 1;
+
+ } else {
+ r->lingering_close = 0;
}
+#if 0
/* TEST STUB */ r->lingering_close = 1;
+#endif
r->connection->write->event_handler = ngx_http_phase_event_handler;
@@ -258,6 +276,11 @@ static void ngx_http_run_phases(ngx_http_request_t *r)
{
rc = h[r->phase_handler](r);
+ if (rc == NGX_DONE) {
+ return;
+ }
+
+ /* TODO THINK: is it dupliate NGX_DONE ??? */
if (r->closed) {
return;
}
@@ -435,7 +458,7 @@ int ngx_http_internal_redirect(ngx_http_request_t *r,
ngx_http_handler(r);
- return NGX_OK;
+ return NGX_DONE;
}