W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2006

[Bug 3574] Validator don't accept Content-Type:\n application/xhtml+xml

From: <bugzilla@wiggum.w3.org>
Date: Wed, 02 Aug 2006 10:39:14 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1G8E8A-0006cs-Da@wiggum.w3.org>


           Summary: Validator don't accept Content-Type:\n
           Product: Validator
           Version: HEAD
          Platform: PC
               URL: http://spacergif.net/2006/08/02/content-type-lf.php
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Parser
        AssignedTo: link@pobox.com
        ReportedBy: wiktor@spacergif.net
         QAContact: www-validator-cvs@w3.org

I played with content-type to see how browsers parse these headers.
Unfortunately I found that validator refuse to validate the document with this
header mentioned in summary.

My code:

header("Content-Type:\n application/xhtml+xml");
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

As far as I know HTTP1.1 allow the multi-lined headers.

Quote from http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html 
2.2 Basic Rules

"HTTP/1.1 header field values can be folded onto multiple lines if the
continuation line begins with a space or horizontal tab. All linear white
space, including folding, has the same semantics as SP. A recipient MAY replace
any linear white space with a single SP before interpreting the field value or
forwarding the message downstream."

So I suppose my code is good. 

I did some test and I found that Validator accepts the file if I change the \n
to \r...

Here are my test results: 

Firefox 1.5     
\r | 13 | CR    HTML
\n | 10 | LF    XML
standard        XML

OPERA 9.0       
\r | 13 | CR    XML
\n | 10 | LF    XML
standard        XML

IE 6.0  
\r | 13 | CR    HTML
\n | 10 | LF    HTML
standard        -

\r | 13 | CR    XML
\n | 10 | LF    refuse
standard        XML

Sorry if I have a mistake... :/
Received on Wednesday, 2 August 2006 10:39:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:18 UTC