comparison src/http/ngx_http_header_filter.c @ 88:674d333f4296

nginx-0.0.1-2003-05-14-21:13:13 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 May 2003 17:13:13 +0000
parents 59229033ae93
children 37530da31268
comparison
equal deleted inserted replaced
87:5f6d848dcbef 88:674d333f4296
63 ngx_null_string, /* 410 */ 63 ngx_null_string, /* 410 */
64 ngx_string("411 Length Required"), 64 ngx_string("411 Length Required"),
65 ngx_null_string, /* 412 */ 65 ngx_null_string, /* 412 */
66 ngx_string("413 Request Entity Too Large"), 66 ngx_string("413 Request Entity Too Large"),
67 ngx_null_string, /* "414 Request-URI Too Large" but we never send it 67 ngx_null_string, /* "414 Request-URI Too Large" but we never send it
68 because we treat such requests as HTTP/0.9 requests 68 because we treat such requests as the HTTP/0.9 requests
69 and send only the body without the header */ 69 and send only the body without the header */
70 ngx_null_string, /* 415 */ 70 ngx_null_string, /* 415 */
71 ngx_string("416 Requested Range Not Satisfiable"), 71 ngx_string("416 Requested Range Not Satisfiable"),
72 72
73 ngx_string("500 Internal Server Error"), 73 ngx_string("500 Internal Server Error"),
122 status = NGX_INVALID_ARRAY_INDEX; 122 status = NGX_INVALID_ARRAY_INDEX;
123 #endif 123 #endif
124 124
125 } else { 125 } else {
126 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) { 126 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) {
127 /* 2XX */
127 status = r->headers_out.status - NGX_HTTP_OK; 128 status = r->headers_out.status - NGX_HTTP_OK;
128 129
129 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) { 130 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) {
131 /* 3XX */
130 status = r->headers_out.status - NGX_HTTP_MOVED_PERMANENTLY + 1; 132 status = r->headers_out.status - NGX_HTTP_MOVED_PERMANENTLY + 1;
131 r->header_only = 1; 133 r->header_only = 1;
132 134
133 } else if (r->headers_out.status < NGX_HTTP_INTERNAL_SERVER_ERROR) { 135 } else if (r->headers_out.status < NGX_HTTP_INTERNAL_SERVER_ERROR) {
136 /* 4XX */
134 status = r->headers_out.status - NGX_HTTP_BAD_REQUEST + 1 + 4; 137 status = r->headers_out.status - NGX_HTTP_BAD_REQUEST + 1 + 4;
135 138
136 } else { 139 } else {
140 /* 5XX */
137 status = r->headers_out.status 141 status = r->headers_out.status
138 - NGX_HTTP_INTERNAL_SERVER_ERROR + 1 + 4 + 17; 142 - NGX_HTTP_INTERNAL_SERVER_ERROR + 1 + 4 + 17;
139 } 143 }
140 144
141 len += http_codes[status].len; 145 len += http_codes[status].len;