1. Open the console 2. Navigate to google.com 3. Observe the warning: "Resource interpreted as Other but transferred with MIME type undefined." (you can repeat the warning by entering https://clients1.google.com/generate_204 into the url bar) I think what's going on here is that the code that generates the warning isn't checking for a 204 status code. As far as I can tell, since a 204 by definition doesn't have any content, this warning is unnecessary. The relevant code is in: /Source/WebCore/inspector/front-end/NetworkManager.js:_updateResourceWithResponse
See also: bug 60206.
Created attachment 115880 [details] My proposed patch to NetworkManager Here's my proposed patch. Simply don't check for mime type consistency on 204 responses, since by definition they contain no data.
Created attachment 118632 [details] Updated patch, hopefully conforms to submission guidelines.
Created attachment 118633 [details] Updated patch, hopefully conforms to submission guidelines.
Attachment 118633 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 118637 [details] ChangeLog now contains bug number.
Comment on attachment 118637 [details] ChangeLog now contains bug number. View in context: https://bugs.webkit.org/attachment.cgi?id=118637&action=review > Source/WebCore/inspector/front-end/NetworkManager.js:155 > + || resource.statusCode === 204 I don't think this is specific to the 204. This check is basically testing whether the mime type returned with the HTTP response is consistent with the type WebKit assigned to the loaded resource. The actual bug is in line 142 above that prints this.type and this.mimeType instead of resource.type and resource.mimeType. Fixing it will uncover whether 204 needs special handling.
I'm reading over the code, and I can't see how this.type and this.mimeType are set at all. I know I've seen various different types come up in the warning message, however. Do you know where those values are being set?
(In reply to comment #8) > I'm reading over the code, and I can't see how this.type and this.mimeType are set at all. I know I've seen various different types come up in the warning message, however. Do you know where those values are being set? As I mentioned above, you should replace "this.mimeType" and "this.type" with "resource.mimeType" and "resource.type" to fix the actual problem.
Created attachment 119235 [details] Patch
Comment on attachment 119235 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119235&action=review > LayoutTests/ChangeLog:4 > + Spurious warnings when receiving HTTP response code 204 > + https://bugs.webkit.org/show_bug.cgi?id=69972 The test doesn't use 204 response code. How does it check that the bug is fixed?
(In reply to comment #11) > (From update of attachment 119235 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=119235&action=review > > > LayoutTests/ChangeLog:4 > > + Spurious warnings when receiving HTTP response code 204 > > + https://bugs.webkit.org/show_bug.cgi?id=69972 > > The test doesn't use 204 response code. How does it check that the bug is fixed? Hm... Looks like there is a misunderstanding what is the actual bug here. My patch is actually fixing the words "Other" and "undefined" in console message mentioned in the first post. This will make an original error message clear. I'll file another bug for that and upload my patch there. Meanwhile I am not sure we should fix the original issue at all - I don't think images should be loaded with mime type text/html. rodarmor, why is that needed?
Filed: https://bugs.webkit.org/show_bug.cgi?id=74516
FWIW, I see a lot of these error messages on mail.google.com (can not reproduce on google.com). They are all about loading images without content and they have both 200 and 204 status codes.
This warning does not seem to exist any more.