[Bug 3531] New: send Content-Type header with charset parameter value unquoted

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Thu Jul 5 05:26:55 CDT 2012


http://bz.selenic.com/show_bug.cgi?id=3531

          Priority: normal
            Bug ID: 3531
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: send Content-Type header with charset parameter value
                    unquoted
          Severity: bug
    Classification: Unclassified
                OS: Mac OS
          Reporter: mike at w3.org
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.2.3
         Component: hgweb
           Product: Mercurial

The current webcommands.py sources both at
http://selenic.com/hg/file/default/mercurial/hgweb/webcommands.py#l61 and at
http://hg.intevation.org/mercurial/crew/file/default/mercurial/hgweb/webcommands.py#l61
have the following:

  mt += '; charset="%s"' % encoding.encoding

Which causes responses to be sent with a Content-Type header like this:

  Content-Type: text/html; charset="UTF-8"

The quotes around UTF-8 are not required. RFC 2616 says that parameters can
either be tokens or quoted strings, but there's no reason to have a quoted
string for the charset case. So Apache and most all other Web servers do not
send it with the value quoted, and it would be good to follow that same
convention.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list