view conf/win-utf @ 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 63a820b0bc6c
children
line wrap: on
line source


# This map is not a full windows-1251 <> utf8 map: it does not
# contain Serbian and Macedonian letters.  If you need a full map,
# use contrib/unicode2nginx/win-utf map instead.

charset_map  windows-1251  utf-8 {

    82  E2809A ; # single low-9 quotation mark

    84  E2809E ; # double low-9 quotation mark
    85  E280A6 ; # ellipsis
    86  E280A0 ; # dagger
    87  E280A1 ; # double dagger
    88  E282AC ; # euro
    89  E280B0 ; # per mille

    91  E28098 ; # left single quotation mark
    92  E28099 ; # right single quotation mark
    93  E2809C ; # left double quotation mark
    94  E2809D ; # right double quotation mark
    95  E280A2 ; # bullet
    96  E28093 ; # en dash
    97  E28094 ; # em dash

    99  E284A2 ; # trade mark sign

    A0  C2A0 ;   # &nbsp;
    A1  D18E ;   # capital Byelorussian short U
    A2  D19E ;   # small Byelorussian short u

    A4  C2A4 ;   # currency sign
    A5  D290 ;   # capital Ukrainian soft G
    A6  C2A6 ;   # borken bar
    A7  C2A7 ;   # section sign
    A8  D081 ;   # capital YO
    A9  C2A9 ;   # (C)
    AA  D084 ;   # capital Ukrainian YE
    AB  C2AB ;   # left-pointing double angle quotation mark
    AC  C2AC ;   # not sign
    AD  C2AD ;   # soft hypen
    AE  C2AE ;   # (R)
    AF  D087 ;   # capital Ukrainian YI

    B0  C2B0 ;   # &deg;
    B1  C2B1 ;   # plus-minus sign
    B2  D086 ;   # capital Ukrainian I
    B3  D196 ;   # small Ukrainian i
    B4  D291 ;   # small Ukrainian soft g
    B5  C2B5 ;   # micro sign
    B6  C2B6 ;   # pilcrow sign
    B7  C2B7 ;   # &middot;
    B8  D191 ;   # small yo
    B9  E28496 ; # numero sign
    BA  D194 ;   # small Ukrainian ye
    BB  C2BB ;   # right-pointing double angle quotation mark

    BF  D197 ;   # small Ukrainian yi

    C0  D090 ;   # capital A
    C1  D091 ;   # capital B
    C2  D092 ;   # capital V
    C3  D093 ;   # capital G
    C4  D094 ;   # capital D
    C5  D095 ;   # capital YE
    C6  D096 ;   # capital ZH
    C7  D097 ;   # capital Z
    C8  D098 ;   # capital I
    C9  D099 ;   # capital J
    CA  D09A ;   # capital K
    CB  D09B ;   # capital L
    CC  D09C ;   # capital M
    CD  D09D ;   # capital N
    CE  D09E ;   # capital O
    CF  D09F ;   # capital P

    D0  D0A0 ;   # capital R
    D1  D0A1 ;   # capital S
    D2  D0A2 ;   # capital T
    D3  D0A3 ;   # capital U
    D4  D0A4 ;   # capital F
    D5  D0A5 ;   # capital KH
    D6  D0A6 ;   # capital TS
    D7  D0A7 ;   # capital CH
    D8  D0A8 ;   # capital SH
    D9  D0A9 ;   # capital SHCH
    DA  D0AA ;   # capital hard sign
    DB  D0AB ;   # capital Y
    DC  D0AC ;   # capital soft sign
    DD  D0AD ;   # capital E
    DE  D0AE ;   # capital YU
    DF  D0AF ;   # capital YA

    E0  D0B0 ;   # small a
    E1  D0B1 ;   # small b
    E2  D0B2 ;   # small v
    E3  D0B3 ;   # small g
    E4  D0B4 ;   # small d
    E5  D0B5 ;   # small ye
    E6  D0B6 ;   # small zh
    E7  D0B7 ;   # small z
    E8  D0B8 ;   # small i
    E9  D0B9 ;   # small j
    EA  D0BA ;   # small k
    EB  D0BB ;   # small l
    EC  D0BC ;   # small m
    ED  D0BD ;   # small n
    EE  D0BE ;   # small o
    EF  D0BF ;   # small p

    F0  D180 ;   # small r
    F1  D181 ;   # small s
    F2  D182 ;   # small t
    F3  D183 ;   # small u
    F4  D184 ;   # small f
    F5  D185 ;   # small kh
    F6  D186 ;   # small ts
    F7  D187 ;   # small ch
    F8  D188 ;   # small sh
    F9  D189 ;   # small shch
    FA  D18A ;   # small hard sign
    FB  D18B ;   # small y
    FC  D18C ;   # small soft sign
    FD  D18D ;   # small e
    FE  D18E ;   # small yu
    FF  D18F ;   # small ya
}