annotate docs/xml/change_log_conf.xml @ 4247:b79dbadb3d5e stable-1.0

Merging r4147, r4148, r4149, r4150, r4207: Fixes of combination of error_page and return directives: *) Fix for incorrect 201 replies from dav module. 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 *) Fix for double content when return is used in error_page handler. Test case: location / { error_page 405 /nope; return 405; } location /nope { return 200; } This is expected to return 405 with empty body, but in 0.8.42+ will return builtin 405 error page as well (though not counted in Content-Length, thus breaking protocol). Fix is to use status provided by rewrite script execution in case it's less than NGX_HTTP_BAD_REQUEST even if r->error_status set. This check is in line with one in ngx_http_script_return_code(). Note that this patch also changes behaviour for "return 302 ..." and "rewrite ... redirect" used as error handler. E.g. location / { error_page 405 /redirect; return 405; } location /redirect { rewrite ^ http://example.com/; } will actually return redirect to "http://example.com/" instead of builtin 405 error page with meaningless Location header. This looks like correct change and it's in line with what happens on e.g. directory redirects in error handlers. *) Fix for "return 202" not discarding body. Big POST (not fully preread) to a location / { return 202; } resulted in incorrect behaviour due to "return" code path not calling ngx_http_discard_request_body(). The same applies to all "return" used with 2xx/3xx codes except 201 and 204, and to all "return ... text" uses. Fix is to add ngx_http_discard_request_body() call to ngx_http_send_response() function where it looks appropriate. Discard body call from emtpy gif module removed as it's now redundant. Reported by Pyry Hakulinen, see http://mailman.nginx.org/pipermail/nginx/2011-August/028503.html *) Incorrect special case for "return 204" removed. The special case in question leads to replies without body in configuration like location / { error_page 404 /zero; return 404; } location /zero { return 204; } while replies with empty body are expected per protocol specs. Correct one will look like if (status == NGX_HTTP_NO_CONTENT) { rc = ngx_http_send_header(r); if (rc == NGX_ERROR || r->header_only) { return rc; } return ngx_http_send_special(r, NGX_HTTP_LAST); } though it looks like it's better to drop this special case at all. *) Clear old Location header (if any) while adding a new one. This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 01 Nov 2011 13:45:33 +0000
parents f872a86a655c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4048
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
1 <?xml version="1.0" ?>
450
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 <!DOCTYPE configuration SYSTEM "../dtd/change_log_conf.dtd" >
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
3
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4 <configuration>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
483
621229427cba nginx-0.1.16-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 450
diff changeset
6 <length>76</length>
450
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 <start> *) </start>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9 <indent> </indent>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 <changes lang="ru">
4048
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
12 <title>Изменения в </title>
450
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
13 <length>66</length>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14
4048
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
15 <bugfix>Исправление</bugfix>
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
16 <feature>Добавление</feature>
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
17 <change>Изменение</change>
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
18 <security>Безопасность</security>
f872a86a655c CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
19 <workaround>Изменение</workaround>
450
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
20 </changes>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
21
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
22 <changes lang="en">
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
23 <title>Changes with </title>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
24 <length>65</length>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26 <bugfix>Bugfix</bugfix>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 <feature>Feature</feature>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
28 <change>Change</change>
573
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 483
diff changeset
29 <security>Security</security>
450
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 <workaround>Workaround</workaround>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
31
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32 <month> Jan </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33 <month> Feb </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34 <month> Mar </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
35 <month> Apr </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
36 <month> May </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 <month> Jun </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38 <month> Jul </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 <month> Aug </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40 <month> Sep </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 <month> Oct </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42 <month> Nov </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 <month> Dec </month>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
45 </changes>
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
46
551102312e19 nginx-0.1.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
47 </configuration>