summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_special_response.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-30All known output headers can be linked lists now.Maxim Dounin1-0/+1
The h->next pointer properly provided as NULL in all cases where known output headers are added. Note that there are 3rd party modules which might not do this, and it might be risky to rely on this for arbitrary headers.
2021-01-26Clean up trailers in ngx_http_clean_header() as well.Sergey Kandaurov1-0/+4
The function has not been updated with introduction of trailers support in 7034:1b068a4e82d8 (1.13.2).
2019-12-23Discard request body when redirecting to a URL via error_page.Ruslan Ermilov1-0/+6
Reported by Bert JW Regeer and Francisco Oca Gonzalez.
2018-09-19Removed bgcolor attribute on body in error pages and autoindex.Nova DasSarma1-34/+34
The bgcolor attribute overrides compatibility settings in browsers and leads to undesirable behavior when the default font color is set to white in the browser, since font-color is not also overridden.
2017-04-25Don't pretend we support HTTP major versions >1 as HTTP/1.1.Ruslan Ermilov1-1/+9
2017-04-11Added support for the "308 Permanent Redirect" (ticket #877).Simon Leblanc1-2/+12
2017-03-24Added support for "429 Too Many Requests" response (RFC6585).Piotr Sikora1-2/+18
This change adds reason phrase in status line and pretty response body when "429" status code is used in "return", "limit_conn_status" and/or "limit_req_status" directives. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2017-01-31Implemented the "server_tokens build" option.Ruslan Ermilov1-1/+12
Based on a patch by Tom Thorogood.
2016-11-04Style: switch.Ruslan Ermilov1-1/+0
2016-10-03Do not set last_buf flag in subrequests.Roman Arutyunyan1-1/+1
The last_buf flag should only be set in the last buffer of the main request. Otherwise, several last_buf flags can appear in output. This can, for example, break the chunked filter, which will include several final chunks in output.
2016-05-20HTTP/2: the "421 Misdirected Request" response (closes #848).Valentin Bartenev1-1/+14
Since 4fbef397c753 nginx rejects with the 400 error any attempts of requesting different host over the same connection, if the relevant virtual server requires verification of a client certificate. While requesting hosts other than negotiated isn't something legal in HTTP/1.x, the HTTP/2 specification explicitly permits such requests for connection reuse and has introduced a special response code 421. According to RFC 7540 Section 9.1.2 this code can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. And the client may retry the request over a different connection. Now this code is used for requests that aren't authorized in current connection. After receiving the 421 response a client will be able to open a new connection, provide the required certificate and retry the request. Unfortunately, not all clients currently are able to handle it well. Notably Chrome just shows an error, while at least the latest version of Firefox retries the request over a new connection.
2016-03-22Backed out server_tokens changes.Maxim Dounin1-34/+15
Backed out changesets: cf3e75cfa951, 6b72414dfb4f, 602dc42035fe, e5076b96fd01.
2016-03-22Reconsidered server_tokens with an empty value.Ruslan Ermilov1-12/+3
An empty value will be treated as "off".
2016-03-15Added variables support to server_tokens.Ruslan Ermilov1-15/+43
It can now be set to "off" conditionally, e.g. using the map directive. An empty value will disable the emission of the Server: header and the signature in error messages generated by nginx. Any other value is treated as "on", meaning that full nginx version is emitted in the Server: header and error messages generated by nginx.
2015-11-30Reduced the number of GET method constants.Ruslan Ermilov1-4/+1
2015-03-31Fixed invalid access to complex value defined as an empty string.Sergey Kandaurov1-2/+2
Found by Valgrind.
2013-08-20Format specifier fixes in error logging.Sergey Kandaurov1-1/+1
2012-11-26Request body: improved handling of incorrect chunked request body.Maxim Dounin1-1/+1
While discarding chunked request body in some cases after detecting request body corruption no error was returned, while it was possible to correctly return 400 Bad Request. If error is detected too late, make sure to properly close connection. Additionally, in ngx_http_special_response_handler() don't return body of 500 Internal Server Error to a client if ngx_http_discard_request_body() fails, but disable keepalive and continue.
2012-11-21Request body: fixed "501 Not Implemented" error handling.Maxim Dounin1-2/+3
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.
2012-07-07Entity tags: clear on entity changes.Maxim Dounin1-0/+2
2012-02-27Added support for the 307 Temporary Redirect.Ruslan Ermilov1-6/+17
2012-02-22Renamed constants and fixed off-by-one error in "msie_padding on" handling.Ruslan Ermilov1-18/+15
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-10-12Clear old Location header (if any) while adding a new one.Maxim Dounin1-0/+2
This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
2011-10-12Stylistic change in checking the boolean expression.Ruslan Ermilov1-1/+1
2011-09-27Fix for incorrect 201 replies from dav module.Maxim Dounin1-3/+2
Replies with 201 code contain body, and we should clearly indicate it's empty if it's empty. Before 0.8.32 chunked was explicitly disabled for 201 replies and as a result empty body was indicated by connection close (not perfect, but worked). Since 0.8.32 chunked is enabled, and this causes incorrect responses from dav module when HTTP/1.1 is used: with "Transfer-Encoding: chunked" but no chunks at all. Fix is to actually return empty body in special response handler instead of abusing r->header_only flag. See here for initial report: http://mailman.nginx.org/pipermail/nginx-ru/2010-October/037535.html
2011-02-01fix "error_page 497 https://" caseIgor Sysoev1-1/+8
patch by Maxim Dounin the bug has been introduced in r3782
2011-01-20introduce 494 code "Request Header Too Large"Igor Sysoev1-0/+12
2010-12-14rename NGX_HTTP_OWN_CODES to NGX_HTTP_NGINX_CODESIgor Sysoev1-4/+4
2010-10-18allow override redirect status in error_pageIgor Sysoev1-3/+5
2010-06-30remove r->zero_body unused since the previous commitIgor Sysoev1-22/+15
2010-06-18303 See OtherIgor Sysoev1-1/+9
2010-05-24remove r->zero_in_uriIgor Sysoev1-2/+0
2010-05-14ngx_str_set() and ngx_str_null()Igor Sysoev1-6/+3
2009-11-12add MSIE padding for Chrome tooIgor Sysoev1-11/+11
2009-05-25reset content_type hash value, this fixes a bug when XSLT responsesIgor Sysoev1-0/+2
could not be processed by SSI, charset, and gzip filters
2009-05-08fix the previous commitIgor Sysoev1-0/+2
2009-05-08allow to pass image filter errors via the same location where the filter is setIgor Sysoev1-2/+12
2009-05-08handle big responses for "size" and "test" image_filtersIgor Sysoev1-1/+11
2009-05-01ngx_http_filter_finalize_request() and ngx_http_clean_header()Igor Sysoev1-0/+34
2009-04-11allow any statusIgor Sysoev1-6/+22
2009-04-07fix r2590: error_page made an external redirect without query stringIgor Sysoev1-6/+6
2009-03-22use complex value in error_pageIgor Sysoev1-51/+12
2008-12-26send "100 Continue" just before reading request bodyIgor Sysoev1-1/+10
2008-08-19leave HEAD method while error_page redirectionIgor Sysoev1-2/+4
2008-08-19do not discard body while error_page redirectionIgor Sysoev1-7/+4
2008-08-13disable error_page loop in 500 error when recursive errors are enabledIgor Sysoev1-1/+1
2008-05-28fix building by bcc/etc introduced in r2038Igor Sysoev1-1/+1
2008-05-26fix debug loggingIgor Sysoev1-1/+2
2008-05-22style fixIgor Sysoev1-2/+2