Bug#745605: apache2: ignores AddDefaultCharset
Control: tags -1 upstream Control: retitle -1 apache2: AddDefaultCharset doesn't work for js Looking at server/protocol.c, in ap_make_content_type(): /* see if it makes sense to add the charset. At present, * we only add it if the Content-type is one of needcset[] */ for (pcset = needcset_patterns; *pcset ; pcset++) { if (apr_strmatch(*pcset, type, type_len) != NULL) { And above, we have: static const char *needcset[] = { "text/plain", "text/html", NULL }; So I guess AddDefaultCharset is only used for these two Content-Types. I didn't test yet. I think it's safe to add application/javascript to the list. An alternative would be to improve the documentation upstream, and the comments in charset.conf. Carlos: Meanwhile, I suggest you specify the charset in your script tag, as suggested in html specification [1]. [1] http://www.w3.org/TR/html5/scripting-1.html#the-script-element signature.asc Description: OpenPGP digital signature
Bug#745605: apache2: ignores AddDefaultCharset
The issue with the form was caused by an incorrect php setting, but the issue with the JS utf-8 encoded file is still happen with 2.4.10-9, the only way to solve it is to add AddCharset UTF-8 .js, In that case the headers are set to UTF-8, but if only AddDefaultCharset UTF-8 is set it seems that is interpreted as iso-8859-1 in firefox, because the charset headers are not set to UTF-8 Kind regards, Carlos On Sun, 13 Jul 2014 16:42:52 +0200 =?ISO-8859-1?Q?Arno_T=F6ll?= wrote: > Hi, > > On 16.06.2014 22:59, Arnaud de Prelle wrote: > > It seems Apache 2.4.9-2 misuses the AddDefaultCharset statement. > > By default it should be Off but the current 2.4.9-2 simply overrides the value of the parameters and sets it to UTF-8. > > are you sure, this isn't overridden by PHP as in Carlos' case? Apache > defaults to > > #define DEFAULT_ADD_DEFAULT_CHARSET_NAME "iso-8859-1" > > > else if (!strcasecmp(arg, "On")) { > d->add_default_charset = ADD_DEFAULT_CHARSET_ON; > d->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME; > > > when set to on, and this code hasn't changed a long time. > > > -- > with kind regards, > Arno Töll > IRC: daemonkeeper on Freenode/OFTC > GnuPG Key-ID: 0x9D80F36D > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Hi, On 16.06.2014 22:59, Arnaud de Prelle wrote: > It seems Apache 2.4.9-2 misuses the AddDefaultCharset statement. > By default it should be Off but the current 2.4.9-2 simply overrides the > value of the parameters and sets it to UTF-8. are you sure, this isn't overridden by PHP as in Carlos' case? Apache defaults to #define DEFAULT_ADD_DEFAULT_CHARSET_NAME "iso-8859-1" else if (!strcasecmp(arg, "On")) { d->add_default_charset = ADD_DEFAULT_CHARSET_ON; d->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME; when set to on, and this code hasn't changed a long time. -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D signature.asc Description: OpenPGP digital signature
Bug#745605: apache2: ignores AddDefaultCharset
The form encoding is not related to this issue, was an incorrect php.ini setting -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Hi, It seems Apache 2.4.9-2 misuses the AddDefaultCharset statement. By default it should be Off but the current 2.4.9-2 simply overrides the value of the parameters and sets it to UTF-8. Forcing the value to Off or to something else (i.e. ISO-8859-1 in my case) will have no impact. The server will always set "Content-Type: text/html; charset=UTF-8". Here is an example of reply for one of my ISO-8859-1 (set in the html header) site when the parameter is set to Off: X-Powered-By: PHP/5.6.0beta4 Vary: Accept-Encoding Server: Apache/2.4.9 (Debian) Keep-Alive: timeout=5, max=100 Date: Mon, 16 Jun 2014 20:56:35 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 873 Content-Encoding: gzip Connection: This is really annoying because browsers will prefer the server value to the value set in the HTML header HTTP-EQUIV. So some of my sites are broken unless I rollback the apache version which is not ideal. Best Regards, Arnaud. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
An update, adding to the form 'enctype="multipart/form-data;charset=utf-8"' breaks the file upload so is not a solution. Any advance with this? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Maybe this is related too, if you put a form with multipart/form-data the string is garbled. try this: index.html: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> post.php:
Bug#745605: apache2: ignores AddDefaultCharset
Stefan, can you reproduce this? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Hi Stefan, If i do a grep in /etc/apache2 searching for AddDefaultCharset, the only other place where it appears is in proxy.conf, but i have this module disabled. I have discovered that the issue happens on utf-8 encoded js files, it works for php and html, try it with a js file, the headers that are expected are: Content-Type: application/javascript; charset=utf-8 but instead the headers that are retrieved are: Content-Type: application/javascript Greetings, Carlos Cerrillo El 27/04/2014 22:02, Stefan Fritsch escribió: > Am Mittwoch, 23. April 2014, 10:40:56 schrieb Carlos: >> Package: apache2 >> Version: 2.4.9-1 >> Severity: important >> >> Dear Maintainer, >> >> I commented out from conf-enabled/charset.conf the AddDefaultCharset >> UTF-8, but this directive is ignored. >> >> I also tried to put this directive in the vhost but still ignored, >> the only solution that solved the problem is using AddCharset >> directive per file type > I cannot reproduce this, it works fine here. Maybe you have an > AddDefaultCharset off somewhere that overrides the value from > charset.conf? > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Am Mittwoch, 23. April 2014, 10:40:56 schrieb Carlos: > Package: apache2 > Version: 2.4.9-1 > Severity: important > > Dear Maintainer, > > I commented out from conf-enabled/charset.conf the AddDefaultCharset > UTF-8, but this directive is ignored. > > I also tried to put this directive in the vhost but still ignored, > the only solution that solved the problem is using AddCharset > directive per file type I cannot reproduce this, it works fine here. Maybe you have an AddDefaultCharset off somewhere that overrides the value from charset.conf? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745605: apache2: ignores AddDefaultCharset
Package: apache2 Version: 2.4.9-1 Severity: important Dear Maintainer, I commented out from conf-enabled/charset.conf the AddDefaultCharset UTF-8, but this directive is ignored. I also tried to put this directive in the vhost but still ignored, the only solution that solved the problem is using AddCharset directive per file type -- Package-specific info: -- System Information: Debian Release: jessie/sid APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.32-19-pve (SMP w/2 CPU cores) Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apache2 depends on: ii apache2-bin 2.4.9-1 ii apache2-data 2.4.9-1 ii lsb-base 4.1+Debian12 ii mime-support 3.54 ii perl 5.18.2-2+b1 ii procps1:3.3.9-2 Versions of packages apache2 recommends: ii ssl-cert 1.0.33 Versions of packages apache2 suggests: pn apache2-doc pn apache2-suexec-pristine | apache2-suexec-custom ii apache2-utils2.4.9-1 ii w3m [www-browser]0.5.3-15 Versions of packages apache2-bin depends on: ii libapr1 1.5.0-1 ii libaprutil1 1.5.3-1+b1 ii libaprutil1-dbd-sqlite3 1.5.3-1+b1 ii libaprutil1-ldap 1.5.3-1+b1 ii libc62.18-4 ii libldap-2.4-22.4.39-1 ii liblua5.1-0 5.1.5-5 ii libpcre3 1:8.31-2 ii libssl1.0.0 1.0.1g-2 ii libxml2 2.9.1+dfsg1-3 ii perl 5.18.2-2+b1 ii zlib1g 1:1.2.8.dfsg-1 Versions of packages apache2-bin suggests: pn apache2-doc pn apache2-suexec-pristine | apache2-suexec-custom ii w3m [www-browser]0.5.3-15 Versions of packages apache2 is related to: ii apache2 2.4.9-1 ii apache2-bin 2.4.9-1 -- Configuration Files: /etc/apache2/conf-available/charset.conf changed [not included] -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org