#745605 Please enable AddDefaultCharset for javascript

Package:
apache2
Source:
apache2
Description:
Apache HTTP Server
Submitter:
Carlos
Date:
2023-12-29 02:06:03 UTC
Severity:
wishlist
Tags:
#745605#5
Date:
2014-04-23 08:40:56 UTC
From:
To:
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

#745605#10
Date:
2014-04-27 20:02:19 UTC
From:
To:
Am Mittwoch, 23. April 2014, 10:40:56 schrieb Carlos:

I cannot reproduce this, it works fine here. Maybe you have an
AddDefaultCharset off somewhere that overrides the value from
charset.conf?

#745605#15
Date:
2014-04-28 06:46:52 UTC
From:
To:
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ó:

#745605#20
Date:
2014-05-08 10:07:32 UTC
From:
To:
Stefan, can you reproduce this?
#745605#25
Date:
2014-05-13 08:32:15 UTC
From:
To:
Maybe this is related too, if you put a form with multipart/form-data
the string is garbled. try this:

index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form method="post" enctype="multipart/form-data" action="post.php">
  <textarea name="text"></textarea>
  <input type="submit" value="Enviar" />
</form>
</body>
</html>

post.php:
<?php
var_dump($_POST["text"]);

To solve this you need to replace 'enctype="multipart/form-data"' with
'enctype="multipart/form-data;charset=utf-8"'

#745605#30
Date:
2014-05-22 08:42:53 UTC
From:
To:
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?

#745605#35
Date:
2014-06-16 20:59:45 UTC
From:
To:
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.

#745605#40
Date:
2014-06-18 12:10:57 UTC
From:
To:
The form encoding is not related to this issue, was an incorrect php.ini
setting

#745605#45
Date:
2014-07-13 14:42:52 UTC
From:
To:
Hi,

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.

#745605#50
Date:
2015-03-10 13:18:36 UTC
From:
To:
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?= <arno@debian.org> wrote:
the value of the parameters and sets it to UTF-8.

#745605#55
Date:
2015-04-29 23:12:31 UTC
From:
To:
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

#745605#64
Date:
2015-04-30 08:36:10 UTC
From:
To:
Hi

I dig a bit more, and this is the expected behaviour:
https://httpd.apache.org/docs/2.4/mod/core.html#adddefaultcharset

So, I'm decreasing severity.

We simply cannot add charset for every types, like images.

Carlos: Am I correct in assuming you would like application/javascript
to be included in the list of supported types?

Upstream is aware of the request:
https://bz.apache.org/bugzilla/show_bug.cgi?id=35049

Thank you for reporting a bug at Debian.

#745605#75
Date:
2015-04-30 10:17:10 UTC
From:
To:
Yes I would like to add application/javascript to the supported types,
because sometimes developers set charset in html but not in the script tag

Jean-Michel thank you for the info and your time

El 30/04/2015 a las 10:36, Jean-Michel Nirgal Vourgère escribió:

#745605#82
Date:
2019-06-17 07:38:38 UTC
From:
To:
Hello,

Our partners referred your company to us. Regarding your great products.
Please see required products, quantity and specifications as attached.

Kindly give us your lowest possible prices for FCL shipment.


Best Regards,

Wanda Rodriguez
Purchase Assistant

Hidroconta Trading Ltd.
Av. de Sta. Catalina,
60, 30012 Murcia, Spain
Phone: +34 968 26 77 66
Fax: +34 968 26 77 06

#745605#87
Date:
2019-06-17 07:38:38 UTC
From:
To:
Hello,

Our partners referred your company to us. Regarding your great products.
Please see required products, quantity and specifications as attached.

Kindly give us your lowest possible prices for FCL shipment.


Best Regards,

Wanda Rodriguez
Purchase Assistant

Hidroconta Trading Ltd.
Av. de Sta. Catalina,
60, 30012 Murcia, Spain
Phone: +34 968 26 77 66
Fax: +34 968 26 77 06

#745605#92
Date:
2020-05-10 08:35:32 UTC
From:
To:
Good day,

My associate from China wants to discuss a business investment deal with
you. I awaiting your response to enable us discuss about this business
investment

Nael M. Al Homoud
Executive Director & High Investment Committee Member@
The Arab Investment Co
www.taic.com [1]



Links:
------
[1] http://www.taic.com

#745605#97
Date:
2020-05-10 08:35:32 UTC
From:
To:
Good day,

My associate from China wants to discuss a business investment deal with
you. I awaiting your response to enable us discuss about this business
investment

Nael M. Al Homoud
Executive Director & High Investment Committee Member@
The Arab Investment Co
www.taic.com [1]



Links:
------
[1] http://www.taic.com

#745605#102
Date:
2021-09-22 07:37:35 UTC
From:
To:
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

#745605#107
Date:
2021-09-22 07:37:35 UTC
From:
To:
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

#745605#112
Date:
2021-09-30 07:30:46 UTC
From:
To:
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

#745605#117
Date:
2021-09-30 07:30:46 UTC
From:
To:
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

#745605#122
Date:
2021-10-19 07:30:36 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#127
Date:
2021-10-19 07:30:36 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#132
Date:
2021-10-29 08:11:01 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#137
Date:
2021-10-29 08:11:01 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#142
Date:
2021-11-04 08:31:28 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#147
Date:
2021-11-04 08:46:30 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#745605#152
Date:
2021-11-12 08:45:54 UTC
From:
To:
Dzień dobry!

Czy mógłbym przedstawić rozwiązanie, które umożliwia monitoring każdego auta w czasie rzeczywistym w tym jego pozycję, zużycie paliwa i przebieg?

Dodatkowo nasze narzędzie minimalizuje koszty utrzymania samochodów, skraca czas przejazdów, a także tworzenie planu tras czy dostaw.

Z naszej wiedzy i doświadczenia korzysta już ponad 49 tys. Klientów. Monitorujemy 809 000 pojazdów na całym świecie, co jest naszą najlepszą wizytówką.

Bardzo proszę o e-maila zwrotnego, jeśli moglibyśmy wspólnie omówić potencjał wykorzystania takiego rozwiązania w Państwa firmie.


Z poważaniem,
Dawid Rowicki

#745605#157
Date:
2021-11-12 08:51:16 UTC
From:
To:
Dzień dobry!

Czy mógłbym przedstawić rozwiązanie, które umożliwia monitoring każdego auta w czasie rzeczywistym w tym jego pozycję, zużycie paliwa i przebieg?

Dodatkowo nasze narzędzie minimalizuje koszty utrzymania samochodów, skraca czas przejazdów, a także tworzenie planu tras czy dostaw.

Z naszej wiedzy i doświadczenia korzysta już ponad 49 tys. Klientów. Monitorujemy 809 000 pojazdów na całym świecie, co jest naszą najlepszą wizytówką.

Bardzo proszę o e-maila zwrotnego, jeśli moglibyśmy wspólnie omówić potencjał wykorzystania takiego rozwiązania w Państwa firmie.


Z poważaniem,
Dawid Rowicki

#745605#162
Date:
2021-12-10 08:45:21 UTC
From:
To:
Dzień dobry,

zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów.

Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.

Możemy porozmawiać w najbliższym czasie?


Pozdrawiam
Adam Furgalski

#745605#167
Date:
2021-12-10 08:50:09 UTC
From:
To:
Dzień dobry,

zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów.

Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.

Możemy porozmawiać w najbliższym czasie?


Pozdrawiam
Adam Furgalski

#745605#172
Date:
2022-12-02 20:26:51 UTC
From:
To:
It seems this bugreport was tagged 'fixed-upstream' automatically after the upstream bug was closed automatically due to age or inactivity.

AFAICT the bug is not fixed, the change proposed in [1] / [2] does not seem to be applied, see [3].

Someone would need to retest this (as described in upstream’s bugtracker’s closing comment), report back, and depending on result either close this bug or reopen upstream’s bug; or alternatively provide a minimal example how to reproduce it for someone else to test.

Thanks!

[1]: https://bz.apache.org/bugzilla/show_bug.cgi?id=35049#c1
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745605#55
[3]: https://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?view=markup#l80

#745605#179
Date:
2023-12-28 18:12:49 UTC
From:
To:
Hello there, I hope receive this message in good spirits. I am
Henry Ledwaba, a private investment broker with a Wealth
Management compapny in South Africa. I am contacting you
privately because one of my high profile clients is interested in
investing investing a very substantial amount abroad and has
asked me to look for individuals and companies with prospective
business ideas that he can invest in. I got your email contact
through an online business directory and I thought I'd contact
you to see if you are interested in this opportunity. Do you or
your company have new or existing projects that requires funding?
If so, please indicate your interest by replying back to this
email. Your response should include the executive summary of the
projects, the amount of funding required for the projects and the
expected ROI.

Once I get your response, we can go through the details of your
projects to determine its viability and also make arrangements
for securing the funding required to execute the projects.

Please also send your direct mobile/whatsapp numbers for an
easier communication. Looking forward to your response.

Best Regards,

Henry.

#745605#184
Date:
2023-12-28 20:42:38 UTC
From:
To:
Hello there, I hope receive this message in good spirits. I am
Henry Ledwaba, a private investment broker with a Wealth
Management compapny in South Africa. I am contacting you
privately because one of my high profile clients is interested in
investing investing a very substantial amount abroad and has
asked me to look for individuals and companies with prospective
business ideas that he can invest in. I got your email contact
through an online business directory and I thought I'd contact
you to see if you are interested in this opportunity. Do you or
your company have new or existing projects that requires funding?
If so, please indicate your interest by replying back to this
email. Your response should include the executive summary of the
projects, the amount of funding required for the projects and the
expected ROI.

Once I get your response, we can go through the details of your
projects to determine its viability and also make arrangements
for securing the funding required to execute the projects.

Please also send your direct mobile/whatsapp numbers for an
easier communication. Looking forward to your response.

Best Regards,

Henry.