Proxy authentication definitions.

This commit is contained in:
Roman Arutyunyan 2026-03-10 16:43:41 +04:00 committed by Roman Arutyunyan
parent 60d0329a20
commit e23e7dd83a
4 changed files with 17 additions and 2 deletions

View file

@ -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"),

View file

@ -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 },

View file

@ -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;

View file

@ -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),