www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Kapustin <...@dd.vaz.tlt.ru>
Subject protocol/6461: Source error: Charset 'iso8859-1' is hardcoded in http_protocol.c (line N 2588).
Date Thu, 24 Aug 2000 10:48:08 GMT

>Number:         6461
>Category:       protocol
>Synopsis:       Source error: Charset 'iso8859-1' is hardcoded in http_protocol.c (line
N 2588).
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          mistaken
>Submitter-Id:   apache
>Arrival-Date:   Thu Aug 24 03:50:01 PDT 2000
>Originator:     kag@dd.vaz.tlt.ru
>Release:        1.3.12
Not important because of ... (see below)
Source error: 
 Charset 'iso8859-1' is hardcoded in http_protocol.c (line N 2588)
 in the block which sends HTTP-header to a client in case of redirect.

 Thus - for each redirect - server sends HTTP-header with phrase:
  'Content-type="text/html; charset=iso8859-1"'.
 Server does it independently of 'AddDefaultCharset Off / On / charset' setting
 in the httpd.conf.
 Client's encoding is damaged because of this behaviour.

 Perhaps all will be OK if the second server (to which redirection is
  performed) sends HTTP-header with phrase:
  'Content-type="text/html; charset=...<proper value>"'.
 In practice, it isn't allways configured so.
Of course you will see this problem only if you have second server with
content's charset not equal to 'iso8859-1'.
1. Configure second server: 'Do not send "charset=..." in HTTP-header'
2. Create HTML-file /xxx.html without meta-tag '...charset=...'
3. Configure Apache1.3.12: place redirect to http://second-server/xxx.html
    into httpd.conf
4. Configure client's browser to view http://second-server/xxx.html properly.
5. Try to view it through redirection.

==> Apache1.3.12 sends charset=iso8859-1 in HTTP-header while redirection
==> Browser sets it's encoding to "iso8859-1"
==> Second server doesn't send any charset-information
==> File http://second-server/xxx.html is viewed unproperly via redirection
==> After it, all other resources from http://second-server/ is viewed unproperly
Yes, and VERY simple way:
 - remove hardcoded charset from http_protocol.c
 For example, line 2588 will be:
  r->content_type = NULL;

After it, server sends phrase 'Content-type: text/plain' or similar
WITHOUT mentioning of 'charset'.
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message