#792331 iceweasel: <meta> encoding specification not taken into account past 1024 bytes in POST results

#792331#5
Date:
2015-07-14 02:12:17 UTC
From:
To:
Dear maintainer,

The bug here is kinda specific and weird, but a test-case is attached. I
apollogise if I don't use the latest version. But this bug has been
there for a while, and it's unlikely to fix itself.

Here is the setup:
- The server send a html content with the header:
	Content-Type: text/html
- No encoding specified in the Content-Type header
- This html content is encoded using UTF-8
- The html contains a <meta> tag specifying the encoding as UTF-8
- This <meta> tag is paste the first 1024 bytes

Triggering the bug:
- Retrive a html page with a GET request and the afformentioned setup,
  and the charset is detected as UTF-8
- Retrive the same page with a POST request and the afformentioned
  setup, and the charset is detected as windows-1252

I know HTML5 specify that any encoding specification should lie in
completely in the first 1024 bytes, but it's not the case for any
previous (X)HTML specifications. In any case, this difference in
behavior between a GET and POST request is really puzzling. As far as I
tested, it happens both in strict mode (tested with xhtml 1.1 page) and
in quirk mode.


Here I join a test-case that includes a line of php to ensure the right
Content-Type header is sent, a large block of comment to put the <meta>
tag after the 1024 first bytes, an UTF-8 accented letter, a form with a
POST method.

The size of the comment block is so that removing one byte make the bug
go away.

Best regards,
Celelibi

#792331#10
Date:
2025-09-18 07:29:21 UTC
From:
To:
src:iceweasel has been superseded by src:firefox-esr in version
45.0esr-1 in March 2016. Transitional packages to ease upgrades were
provided in the wheezy, jessie, stretch and buster releases. The
transitional packages have been removed finally before the bullseye
release in August 2021.
After regular security support for buster ended in August 2022 and LTS
support ended in June 2024, I'm closing the remaining bug reports now.

Andreas