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
CC:
To: www-validator-cvs@w3.org
Message-Id: <E1G8E8A-0006cs-Da@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3574

           Summary: Validator don't accept Content-Type:\n
                    application/xhtml+xml
           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:

<?php
header("Content-Type:\n application/xhtml+xml");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
.
.
.
</html>

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        -

W3 VALIDATOR    
\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.3.1 : Wednesday, 7 January 2015 15:17:25 UTC