New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774029 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

CSS File not rendered if multiple Content-Type headers

Reported by robininf...@gmail.com, Oct 12 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Make a html page with a CSS file used
2. Set a server serve this files and have two content type header or the CSS file
* Content-Type: plain/text
* Content-Type: text/css
3. Go to your browser to visit this webpage

What is the expected behavior?
Have the webpage displaying with the css style or prompt a warning about a css file transferred with plain/text

What went wrong?
The css is loaded but not used and doesn't prompt any warning

Did this work before? N/A 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: Ubuntu 16.04.3 LTS
Flash Version:
 
Cc: susanjuniab@chromium.org
Labels: Needs-Triage-M61 Needs-Feedback
robininfo.edsx@ Thanks for the issue

Could you please provide us the sample CSS file to test this issue which will help in further triaging.

Thanks..
It can be any HTML that load a css file and the server serve the CSS file with Content-Type headers :
Content-Type: text/plain
Content-Type: text/css
Like this ones attached
test.css
35 bytes View Download
test.html
308 bytes View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Oct 14 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "susanjuniab@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Here is a nodejs script to serve the css file with problematic header.
index.js
580 bytes View Download
Cc: krajshree@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Win-10 and Ubuntu 16.04 using chrome reported version #61.0.3163.100 and latest dev#63.0.3236.7.

Attached a screen shotfor reference.

Following are the steps followed to reproduce the issue.
------------
1. Opened the attached file "test.html" in chrome browser.
Note: Kept all the 3 files i.e test.css, test.html and index.js in a folder.
2. Observed that the page appeared red as per the css file.

Reporter@ - Could you please check the attached screen shot and please let us know if anything missed from our side. Also please check the issue on latest dev #63.0.3236.7 by creating a new profile without any apps and extensions and please let us know if the issue still persist or not.

Thanks...!!
774029.png
231 KB View Download
Open it as a file like in the screenshot will not cause the problem
The problem is caused by the duplicated Content-Type field from the server.
Try it with all included files and run the javascript file with node (I tried it with Node v8.7.0) and you will see that the content is correctly loaded however the background will not be red as expected and the console will not print warning about the content type.
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 16 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Screenshot of the page with the nodejs server.
chrome_2017-10-17_01-17-26.png
25.0 KB View Download
chrome_2017-10-17_01-17-47.png
62.1 KB View Download
chrome_2017-10-17_01-16-51.png
41.0 KB View Download
chrome_2017-10-17_01-18-51.png
46.2 KB View Download
chrome_2017-10-17_01-20-19.png
79.7 KB View Download
Result of this page in Firefox and Edge for comparison
firefox_2017-10-17_01-30-15.png
15.7 KB View Download
ApplicationFrameHost_2017-10-17_01-30-38.png
49.5 KB View Download
Components: Blink>CSS
Unable to reproduce the issue on Ubuntu 16.04 using chrome reported version #61.0.3163.100 and latest dev#63.0.3236.7.

Attached a screen cast for reference.

Following are the steps followed to reproduce the issue.
------------
1. Opened the attached file "test.html" by running a localhost:8000//test.html in chrome browser.
2. Observed that the page appeared red as per the css file.

Requesting any dev from Blink>CSS team to please have a look into the issue.

Thanks...!!
774029.ogv
2.2 MB View Download
If you use my script and have node installed:
1. Use 'node index.js' to start the server on port 8080
2. Go to http://127.0.0.1:8080
3. You will see that the webpage have a white background (instead of red) even if the css is loaded without a warning.

Comment 13 by shend@chromium.org, Oct 17 2017

Cc: shend@chromium.org
Components: -UI -Blink>CSS Internals>Network
Appears to be an issue with HTTP headers, so redirecting to Internals>Network, but I could be wrong.

Comment 14 by mattm@chromium.org, Oct 20 2017

Status: WontFix (was: Unconfirmed)
Sending two Content-Type headers is invalid.

https://tools.ietf.org/html/rfc7230#section-3.2.2
" A sender MUST NOT generate multiple header fields with the same field
   name in a message unless either the entire field value for that
   header field is defined as a comma-separated list [i.e., #(values)]
   or the header field is a well-known exception (as noted below)."

Content-type is not such a header.
Well at least warn about invalid header, like so developers will be able to know that's something about server headers is wrong instead of searching for an issue which looks like a render issue, has the css is correctly loaded, but not use and that without a warning.
I think we need to have at least a warning for such a case as Chromium doesn't know how to hold that case.

Sign in to add a comment