diff options
author | Igor Sysoev <igor@sysoev.ru> | 2002-10-04 17:58:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2002-10-04 17:58:04 +0000 |
commit | 2ba1ee0930adc22206cad54c46fc682485933963 (patch) | |
tree | 2ebfae2a782c4793eb8ba30609f4240661fc497f /src/http/ngx_http_parse.c | |
parent | 31f8818eb110d18e58fef72684418c33ddbd7a0b (diff) | |
download | nginx-2ba1ee0930adc22206cad54c46fc682485933963.tar.gz nginx-2ba1ee0930adc22206cad54c46fc682485933963.zip |
nginx-0.0.1-2002-10-04-21:58:04 import
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r-- | src/http/ngx_http_parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 155dec6ae..8f2db680f 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -32,7 +32,7 @@ printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s", state, p, r->header_in->last, ch, p); */ - /* GCC 2.95.2 and VC 6.0 compiles this switch as jump table */ + /* GCC 2.95.2 and VC 6.0 compile this switch as jump table */ switch (state) { @@ -257,7 +257,6 @@ printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s", return NGX_HTTP_PARSE_INVALID_REQUEST; r->http_minor = ch - '0'; - state = sw_minor_digit; break; @@ -281,6 +280,7 @@ printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s", /* end of request line */ case sw_almost_done: + r->request_end = p - 2; switch (ch) { case LF: state = sw_done; @@ -295,6 +295,8 @@ printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s", r->header_in->pos.mem = p; if (state == sw_done) { + if (r->request_end == NULL) + r->request_end = p - 1; r->http_version = r->http_major * 1000 + r->http_minor; r->state = sw_start; if (r->http_version == 9 && r->method == NGX_HTTP_HEAD) |