Mailing List Archive

[Bug 65699] New: "AddDefaultCharset UTF-8" not honoured for redirects
https://bz.apache.org/bugzilla/show_bug.cgi?id=65699

Bug ID: 65699
Summary: "AddDefaultCharset UTF-8" not honoured for redirects
Product: Apache httpd-2
Version: 2.4.41
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: bugs@httpd.apache.org
Reporter: apache.tgoeg@neverbox.org
Target Milestone: ---

On a standard Ubuntu 20.04 LTS installation with Apache 2.4.41, I get wrong
charset definitions when Apache sends an implicit 301 upon request for static
pages at domain.com/path (which gets redirected to domain.com/path/).

It specifies

> Content-Type text/html; charset=iso8859-1

This happens even if I set

> AddDefaultCharset UTF-8

in the vhost config (per vhost or per directory, does not matter).

This option only seems to apply to regularly delivered pages, not non-2xx ones.
I consider this a bug in Apache, as
https://httpd.apache.org/docs/current/mod/mod_headers.html#Header implicitly
states that setting (well, at least "adding") headers for non-2xx pages should
be possible:

"[..]You're adding a header to a locally generated non-success (non-2xx)
response, such as a redirect, in which case only the table corresponding to
always is used in the ultimate response.[..]"

Setting

> Header always edit Content-Type iso-8859-1 utf-8

however *does* apply to this 301 page as well.

Apart from this issue, I think choosing utf-8 as a default charset for non-2xx
pages would make for a better default.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org