Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-01-19 21:09:14 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-01-19 21:09:14 +0300
commita1c8a92566ab0bbb8c58c06038474670aca52407 (patch)
tree9b040d6c201c25b81ae611625b6b814e122a2743 /src
parenta2aca9ae929e086b627c5adef295ba5bbb6fe82d (diff)
nginx-0.0.1-2004-01-19-21:09:14 import
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_request.c4
-rw-r--r--src/http/ngx_http_special_response.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 256a41aae..8679ee787 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -493,6 +493,10 @@ static void ngx_http_process_request_line(ngx_event_t *rev)
r->request_line.len = p - r->request_start;
r->request_line.data = r->request_start;
+ if (rc == NGX_HTTP_PARSE_INVALID_METHOD) {
+ r->http_version = NGX_HTTP_VERSION_10;
+ }
+
ngx_http_client_error(r, rc,
(rc == NGX_HTTP_PARSE_INVALID_METHOD) ?
NGX_HTTP_NOT_IMPLEMENTED:
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 8e93e90ce..51ebd0959 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -110,6 +110,14 @@ static char error_500_page[] =
;
+static char error_501_page[] =
+"<html>" CRLF
+"<head><title>501 Method Not Implemented</title></head>" CRLF
+"<body bgcolor=\"white\">" CRLF
+"<center><h1>500 Method Not Implemented</h1></center>" CRLF
+;
+
+
static char error_502_page[] =
"<html>" CRLF
"<head><title>502 Bad Gateway</title></head>" CRLF
@@ -159,7 +167,7 @@ static ngx_str_t error_pages[] = {
ngx_string(error_416_page),
ngx_string(error_500_page),
- ngx_null_string, /* 501 */
+ ngx_string(error_501_page),
ngx_string(error_502_page),
ngx_string(error_503_page),
ngx_string(error_504_page)