aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-12-06 16:32:33 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-12-06 16:32:33 +0000
commitef259d140f378be8d7936d04038354a93cccb461 (patch)
tree731e20f9427c961a2283bfd1c03f574fd7dffcf1 /src/http/ngx_http_parse.c
parent6ed07e4f0640e1f1c9717fdaa952edf26faa86e0 (diff)
downloadnginx-ef259d140f378be8d7936d04038354a93cccb461.tar.gz
nginx-ef259d140f378be8d7936d04038354a93cccb461.zip
nginx-0.0.1-2002-12-06-19:32:33 import
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r--src/http/ngx_http_parse.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 9cf867652..8d514db69 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -312,86 +312,6 @@ printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s",
}
}
-#if 0
-int ngx_read_http_response_line(ngx_http_request_t *r)
-{
- char c, ch;
- char *p;
- enum {
- sw_start = 0,
- sw_done
- } state;
-
- state = r->state;
- p = r->header_in->pos.mem;
-
- while (p < r->header_in->last.mem && state < sw_done) {
- ch = *p++;
-
-/*
-printf("\nstate: %d, pos: %x, end: %x, char: '%c' buf: %s",
- state, p, r->header_in->last, ch, p);
-*/
-
- switch (state) {
-
- /* "HTTP/" */
- case sw_start:
- if (p + 3 >= r->header_in->last.mem)
- return NGX_AGAIN;
-
- if (ch != 'H' || *p != 'T' || *(p + 1) != 'T' || *(p + 2) != 'P'
- || *(p + 3) != '/')
- return NGX_HTTP_PARSE_NO_HEADER;
-
- p += 4;
- state = sw_first_major_digit;
- break;
-
- /* first digit of major HTTP version */
- case sw_first_major_digit:
- if (ch < '1' || ch > '9')
- return NGX_HTTP_PARSE_NO_HEADER;
-
- state = sw_major_digit;
- break;
-
- /* major HTTP version or dot */
- case sw_major_digit:
- if (ch == '.') {
- state = sw_first_minor_digit;
- break;
- }
-
- if (ch < '0' || ch > '9')
- return NGX_HTTP_PARSE_NO_HEADER;
-
- break;
-
- /* first digit of minor HTTP version */
- case sw_first_minor_digit:
- if (ch < '0' || ch > '9')
- return NGX_HTTP_PARSE_NO_HEADER;
-
- state = sw_minor_digit;
- break;
-
- /* minor HTTP version or end of request line */
- case sw_minor_digit:
- if (ch == ' ') {
- state = sw_code;
- break;
- }
-
- if (ch < '0' || ch > '9')
- return NGX_HTTP_PARSE_NO_HEADER;
-
- break;
- }
- }
-}
-#endif
-
int ngx_read_http_header_line(ngx_http_request_t *r)
{
char c, ch;