Mercurial > hg > nginx-quic
comparison src/http/ngx_http_special_response.c @ 4920:812c4765c954
Request body: fixed "501 Not Implemented" error handling.
It is not about "Method" but a generic message, and is expected to be used
e.g. if specified Transfer-Encoding is not supported. Fixed message to
match RFC 2616.
Additionally, disable keepalive on such errors as we won't be able to read
request body correctly if we don't understand Transfer-Encoding used.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 21 Nov 2012 00:54:01 +0000 |
parents | 4a18bf1833a9 |
children | 7bd1c839af3b |
comparison
equal
deleted
inserted
replaced
4919:bd6299189b49 | 4920:812c4765c954 |
---|---|
258 ; | 258 ; |
259 | 259 |
260 | 260 |
261 static char ngx_http_error_501_page[] = | 261 static char ngx_http_error_501_page[] = |
262 "<html>" CRLF | 262 "<html>" CRLF |
263 "<head><title>501 Method Not Implemented</title></head>" CRLF | 263 "<head><title>501 Not Implemented</title></head>" CRLF |
264 "<body bgcolor=\"white\">" CRLF | 264 "<body bgcolor=\"white\">" CRLF |
265 "<center><h1>501 Method Not Implemented</h1></center>" CRLF | 265 "<center><h1>501 Not Implemented</h1></center>" CRLF |
266 ; | 266 ; |
267 | 267 |
268 | 268 |
269 static char ngx_http_error_502_page[] = | 269 static char ngx_http_error_502_page[] = |
270 "<html>" CRLF | 270 "<html>" CRLF |
382 case NGX_HTTP_REQUEST_URI_TOO_LARGE: | 382 case NGX_HTTP_REQUEST_URI_TOO_LARGE: |
383 case NGX_HTTP_TO_HTTPS: | 383 case NGX_HTTP_TO_HTTPS: |
384 case NGX_HTTPS_CERT_ERROR: | 384 case NGX_HTTPS_CERT_ERROR: |
385 case NGX_HTTPS_NO_CERT: | 385 case NGX_HTTPS_NO_CERT: |
386 case NGX_HTTP_INTERNAL_SERVER_ERROR: | 386 case NGX_HTTP_INTERNAL_SERVER_ERROR: |
387 case NGX_HTTP_NOT_IMPLEMENTED: | |
387 r->keepalive = 0; | 388 r->keepalive = 0; |
388 } | 389 } |
389 } | 390 } |
390 | 391 |
391 if (r->lingering_close) { | 392 if (r->lingering_close) { |