Mercurial > hg > nginx
diff src/http/ngx_http_event.c @ 20:a649c0a0adb3
nginx-0.0.1-2002-12-03-18:45:38 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 03 Dec 2002 15:45:38 +0000 |
parents | d7908993fdeb |
children | aa3b53e74728 |
line wrap: on
line diff
--- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -270,11 +270,19 @@ static int ngx_http_process_request_line c = r->connection; if (rc == NGX_OK) { - ngx_test_null(r->uri, - ngx_palloc(r->pool, r->uri_end - r->uri_start + 1), + len = r->uri_end - r->uri_start + 1; + ngx_test_null(r->uri, ngx_palloc(r->pool, len), ngx_http_close_request(r)); - ngx_cpystrn(r->uri, r->uri_start, r->uri_end - r->uri_start + 1); + ngx_cpystrn(r->uri, r->uri_start, len); + r->request_line.len = r->request_end - r->header_in->start; + ngx_test_null(r->request_line.data, + ngx_palloc(r->pool, r->request_line.len + 1), + ngx_http_close_request(r)); + ngx_cpystrn(r->request_line.data, r->header_in->start, + r->request_line.len + 1); + + /* TEMP */ ngx_test_null(request, ngx_push_array(c->requests), ngx_http_close_request(r)); @@ -288,6 +296,7 @@ static int ngx_http_process_request_line ngx_cpystrn(*request, r->header_in->start, len); ngx_log_debug(c->log, "REQ: '%s'" _ *request); + /* */ if (r->uri_ext) { ngx_test_null(r->exten, @@ -372,7 +381,7 @@ static int ngx_http_process_request_head int i; ngx_table_elt_t *h; - ngx_test_null(h, ngx_push_array(r->headers_in.headers), NGX_ERROR); + ngx_test_null(h, ngx_push_table(r->headers_in.headers), NGX_ERROR); h->key.len = r->header_name_end - r->header_name_start; ngx_test_null(h->key.data, ngx_palloc(r->pool, h->key.len + 1), NGX_ERROR); @@ -583,7 +592,7 @@ static int ngx_http_set_default_handler( int err, rc; char *name, *loc, *file; -#if 0 +#if 1 /* STUB */ r->handler = ngx_http_proxy_handler; return NGX_OK;