You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jie Gao <J....@isu.usyd.edu.au> on 2005/05/23 03:58:39 UTC

adddefaultcharset and proxypass

Hi All,

apache_2.0.52
-------------

In an instance of a webserver, AddDefaultCharset is set to iso-8859-1,
and a subset of the website is ProxyPass'ed to another site, which does
not have AddDefaultCharset set. The front-end server adds
charset=iso-8859-1 to the header of the output of the backend server.
Is this expected behaviour?

Thanks,


Jie



Re: adddefaultcharset and proxypass

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Mon, 23 May 2005, Nick Kew wrote:

> Date: Mon, 23 May 2005 08:29:14 +0100
> From: Nick Kew <ni...@webthing.com>
> Reply-To: dev@httpd.apache.org
> To: dev@httpd.apache.org
> Subject: Re: adddefaultcharset and proxypass
>
> Paul Querna wrote:
> > Jie Gao wrote:
> >
> >>Hi All,
> >>
> >>apache_2.0.52
> >>-------------
> >>
> >>In an instance of a webserver, AddDefaultCharset is set to iso-8859-1,
> >>and a subset of the website is ProxyPass'ed to another site, which does
> >>not have AddDefaultCharset set. The front-end server adds
> >>charset=iso-8859-1 to the header of the output of the backend server.
> >>Is this expected behaviour?
> >
> >
> > Expected Behavior: yes.
> >
> > Desired: Depends.
>
> On what?  It's a bug to change the header unless the proxy makes a
> corresponding change in the data, or at least verifies it.  But it's
> really a configuration bug in having a default charset in the proxy
> scope.
>
> FWIW mod_proxy_html will change both the header and the data to UTF-8.
>
> > Anyways, in newer versions, we do not include the AddDefaultCharset in
> > the configuration.
>
> Yep.  As discussed elsewhere, a serverwide DefaultCharset is simply
> wrong in many cases.  Whatever we do will be right for some and wrong
> for others.

I certainly would not set DefaultCharset for news servers, but for
existing servers, it would be good to be able to set DefaultCharset off
when proxypass a sub-section of the website to another server. We can't
seem to do this at this time.

Regards,


Jie


Re: adddefaultcharset and proxypass

Posted by Nick Kew <ni...@webthing.com>.
Paul Querna wrote:
> Jie Gao wrote:
> 
>>Hi All,
>>
>>apache_2.0.52
>>-------------
>>
>>In an instance of a webserver, AddDefaultCharset is set to iso-8859-1,
>>and a subset of the website is ProxyPass'ed to another site, which does
>>not have AddDefaultCharset set. The front-end server adds
>>charset=iso-8859-1 to the header of the output of the backend server.
>>Is this expected behaviour?
> 
> 
> Expected Behavior: yes.
> 
> Desired: Depends.

On what?  It's a bug to change the header unless the proxy makes a
corresponding change in the data, or at least verifies it.  But it's
really a configuration bug in having a default charset in the proxy
scope.

FWIW mod_proxy_html will change both the header and the data to UTF-8.

> Anyways, in newer versions, we do not include the AddDefaultCharset in
> the configuration.

Yep.  As discussed elsewhere, a serverwide DefaultCharset is simply
wrong in many cases.  Whatever we do will be right for some and wrong
for others.

Re: adddefaultcharset and proxypass

Posted by Paul Querna <ch...@force-elite.com>.
Jie Gao wrote:
> Hi All,
> 
> apache_2.0.52
> -------------
> 
> In an instance of a webserver, AddDefaultCharset is set to iso-8859-1,
> and a subset of the website is ProxyPass'ed to another site, which does
> not have AddDefaultCharset set. The front-end server adds
> charset=iso-8859-1 to the header of the output of the backend server.
> Is this expected behaviour?

Expected Behavior: yes.

Desired: Depends.  If you don't want it, or if it is causing problems,
feel free to turn it off.

Anyways, in newer versions, we do not include the AddDefaultCharset in
the configuration.

-Paul