<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3574</bug_id>
          
          <creation_ts>2006-08-02 10:39:13 +0000</creation_ts>
          <short_desc>Validator don&apos;t accept Content-Type:\n application/xhtml+xml</short_desc>
          <delta_ts>2006-08-05 09:51:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>Parser</component>
          <version>HEAD</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://spacergif.net/2006/08/02/content-type-lf.php</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.8.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ih">wiktor</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10992</commentid>
    <comment_count>0</comment_count>
    <who name="Ih">wiktor</who>
    <bug_when>2006-08-02 10:39:13 +0000</bug_when>
    <thetext>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:

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

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

&quot;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.&quot;

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... :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11028</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2006-08-05 09:51:18 +0000</bug_when>
    <thetext>I think you&apos;re right, thanks for the sample URL.  Fixed in CVS:

http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fspacergif.net%2F2006%2F08%2F02%2Fcontent-type-lf.php
http://qa-dev.w3.org/wmvs/0.7/check?uri=http%3A%2F%2Fspacergif.net%2F2006%2F08%2F02%2Fcontent-type-lf.php

http://www.w3.org/mid/E1G9Igf-0002Hh-My%40lionel-hutz.w3.org
http://www.w3.org/mid/E1G9Ifn-0001z6-Ve%40lionel-hutz.w3.org</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>