This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6493 - Use encoding of POSTing document for POST response if meta prescan fails
Summary: Use encoding of POSTing document for POST response if meta prescan fails
Status: VERIFIED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: NoReply
Depends on:
Blocks:
 
Reported: 2009-01-29 12:50 UTC by Henri Sivonen
Modified: 2010-10-04 14:32 UTC (History)
4 users (show)

See Also:


Attachments

Description Henri Sivonen 2009-01-29 12:50:59 UTC
If my reading of Gecko source code is correct, the encoding of the document initiating a POST should be used when parsing the POST response if the HTTP header, BOM and meta prescan encoding sources fail for the POST response.
Comment 1 Boris Zbarsky 2009-01-29 14:32:37 UTC
Henri, which code are you looking at here?  The charset detection stuff in nsHTMLDocument uses all sorts of sources of information, including the previous document, parent document, etc, etc...  is that what you're referring to?
Comment 2 Henri Sivonen 2009-01-29 14:59:51 UTC
I'm referring to
http://mxr.mozilla.org/mozilla-central/source/content/html/document/src/nsHTMLDocument.cpp#844

I can't find any other occasion than a POST-based navigation where the encoding of the previous document is used.

I also saw that same-origin frames inherit charset from the parent, but I wasn't prepared to file a spec bug about that, yet.
Comment 3 Boris Zbarsky 2009-01-29 15:55:10 UTC
Ah, I didn't realize that was restricted to POST pages.

For what it's worth, I suspect that there's a security issue there, and had been planning to go through this code carefully and rewrite it.  See https://bugzilla.mozilla.org/show_bug.cgi?id=408457
Comment 4 Ian 'Hixie' Hickson 2009-04-01 00:55:33 UTC
According to my tests:
   http://www.hixie.ch/tests/adhoc/html/parsing/encoding/navigation/
...neither WebKit or Opera do this. So I haven't done it in the spec either.
Comment 5 Maciej Stachowiak 2010-03-14 13:16:36 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.