Updates:
Cc: [email protected]
Comment #6 on issue 16873 by [email protected]: Cache sometimes spits
out resources as text/plain
http://code.google.com/p/chromium/issues/detail?id=16873
Disclaimer: This is not what we were doing when the bug was filed.
Following the code I see that the requests go though the logic of a cache
transaction
in UPDATE mode (because it used explicit if-modified headers).
So: the server response is a 304 (not modified), and the code of
HttpCache::Transaction::OnNetworkInfoAvailable() first closes the disk
entry and
changes the mode to NONE (because we are not using the cache anymore) and
then copies
the new response over the old one (because we want to return 304 to the
caller).
As a result, the mime type is no longer part of the header (because the
server is not
sending it for a 304, nothing changed), and when we reach RDH we decide
that we need
to sniff the mime type (because we don't have one) and we end up with a
generic one.
I'd say that webkit should ignore the request's mime type for a 304
response and keep
the old one, but maybe that's just me.
BTW, this explains why when I disable the whole cache the behavior is the
same... we
reach RDH with a 304 and the headers sent by the server. Maybe we can skip
sniffing
mime types for 304 and leave that field empty.
Adding Eric, who added the current logic.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---