Bug 173191 - REGRESSION: trac.webkit.org/export returns Content-Type application/xhtml+xml for .html files
Summary: REGRESSION: trac.webkit.org/export returns Content-Type application/xhtml+xml...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2017-06-09 16:01 PDT by Daniel Bates
Modified: 2017-06-14 23:24 PDT (History)
5 users (show)

See Also:


Attachments
[Screenshot] Parse error (50.31 KB, image/png)
2017-06-09 16:03 PDT, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-06-09 16:01:51 PDT
Visit <https://trac.webkit.org/export/218025/webkit/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/allow-favicon.html> and you will see the following error message:

[[
This page contains the following errors:

error on line 18 at column 8: Opening and ending tag mismatch: link line 0 and head
Below is a rendering of the page up to the first error.
]]

This error occurs because Trac is returned an HTTP response with Content-Type: application/xhtml+xml; charset=utf-8. So, Safari parses the response as XML. But the markup is HTML, which is more lenient that XML; => Safari errors out. 

For completeness, I got this export URL by visiting <https://trac.webkit.org/browser/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/allow-favicon.html> and clicking the hyperlink "Original Format" at the bottom of the page.

Trac.webkit.org returns the correct Content-Type for plain text files. You can see this by clicking "Original Format" at the bottom of <https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/LICENSE-APPLE>
Comment 1 Daniel Bates 2017-06-09 16:03:07 PDT
Created attachment 312505 [details]
[Screenshot] Parse error
Comment 2 Daniel Bates 2017-06-09 16:04:22 PDT
To be clear, Trac should return an HTML content-type for <https://trac.webkit.org/export/218025/webkit/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/allow-favicon.html>.
Comment 3 Alexey Proskuryakov 2017-06-09 20:02:43 PDT
I think that for this to work, we may need to set content type in svn. Some tests actually work, an my assumption that I didn't don't yet attempt to verify is that it's the ones that have svn properties on them.
Comment 4 Alexey Proskuryakov 2017-06-14 23:24:50 PDT
I added a MIME type in r218317, and now this file doesn't have the problem any more indeed:

https://trac.webkit.org/export/218317/webkit/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/allow-favicon.html