mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 12:22:41 +08:00
do not set charset for subrequests
This commit is contained in:
parent
4b14a97b65
commit
77adc0d6c2
@ -252,10 +252,7 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
|
||||
"charset: \"%V\" > \"%V\"", &src, &dst);
|
||||
|
||||
if (source_charset == NGX_HTTP_CHARSET_OFF) {
|
||||
|
||||
if (r == r->main) {
|
||||
ngx_http_set_charset(r, &dst);
|
||||
}
|
||||
ngx_http_set_charset(r, &dst);
|
||||
|
||||
return ngx_http_next_header_filter(r);
|
||||
}
|
||||
@ -488,6 +485,10 @@ ngx_http_get_charset(ngx_http_request_t *r, ngx_str_t *name)
|
||||
static ngx_inline void
|
||||
ngx_http_set_charset(ngx_http_request_t *r, ngx_str_t *charset)
|
||||
{
|
||||
if (r != r->main) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (r->headers_out.status == NGX_HTTP_MOVED_PERMANENTLY
|
||||
|| r->headers_out.status == NGX_HTTP_MOVED_TEMPORARILY)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user