diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ngx_http_header_filter_module.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_request.c | 4 | ||||
| -rw-r--r-- | src/http/ngx_http_request.h | 3 | ||||
| -rw-r--r-- | src/http/ngx_http_special_response.c | 10 |
4 files changed, 17 insertions, 2 deletions
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c index 789938329..15215c531 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -91,7 +91,7 @@ static ngx_str_t ngx_http_status_lines[] = { ngx_string("404 Not Found"), ngx_string("405 Not Allowed"), ngx_string("406 Not Acceptable"), - ngx_null_string, /* "407 Proxy Authentication Required" */ + ngx_string("407 Proxy Authentication Required"), ngx_string("408 Request Time-out"), ngx_string("409 Conflict"), ngx_string("410 Gone"), diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 41c1cda04..7305af132 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -152,6 +152,10 @@ ngx_http_header_t ngx_http_headers_in[] = { offsetof(ngx_http_headers_in_t, authorization), ngx_http_process_unique_header_line }, + { ngx_string("Proxy-Authorization"), + offsetof(ngx_http_headers_in_t, proxy_authorization), + ngx_http_process_unique_header_line }, + { ngx_string("Keep-Alive"), offsetof(ngx_http_headers_in_t, keep_alive), ngx_http_process_header_line }, diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 1b012f810..7a77498eb 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -95,6 +95,7 @@ #define NGX_HTTP_FORBIDDEN 403 #define NGX_HTTP_NOT_FOUND 404 #define NGX_HTTP_NOT_ALLOWED 405 +#define NGX_HTTP_PROXY_AUTH_REQUIRED 407 #define NGX_HTTP_REQUEST_TIME_OUT 408 #define NGX_HTTP_CONFLICT 409 #define NGX_HTTP_LENGTH_REQUIRED 411 @@ -210,6 +211,7 @@ typedef struct { #endif ngx_table_elt_t *authorization; + ngx_table_elt_t *proxy_authorization; ngx_table_elt_t *keep_alive; @@ -273,6 +275,7 @@ typedef struct { ngx_table_elt_t *content_range; ngx_table_elt_t *accept_ranges; ngx_table_elt_t *www_authenticate; + ngx_table_elt_t *proxy_authenticate; ngx_table_elt_t *expires; ngx_table_elt_t *etag; diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index eaf42e399..2984ffe42 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -153,6 +153,14 @@ static char ngx_http_error_406_page[] = ; +static char ngx_http_error_407_page[] = +"<html>" CRLF +"<head><title>407 Proxy Authentication Required</title></head>" CRLF +"<body>" CRLF +"<center><h1>407 Proxy Authentication Required</h1></center>" CRLF +; + + static char ngx_http_error_408_page[] = "<html>" CRLF "<head><title>408 Request Time-out</title></head>" CRLF @@ -364,7 +372,7 @@ static ngx_str_t ngx_http_error_pages[] = { ngx_string(ngx_http_error_404_page), ngx_string(ngx_http_error_405_page), ngx_string(ngx_http_error_406_page), - ngx_null_string, /* 407 */ + ngx_string(ngx_http_error_407_page), ngx_string(ngx_http_error_408_page), ngx_string(ngx_http_error_409_page), ngx_string(ngx_http_error_410_page), |
