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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26572</bug_id>
          
          <creation_ts>2009-06-20 05:47:22 -0700</creation_ts>
          <short_desc>MIME type warning when some files read from cache</short_desc>
          <delta_ts>2009-07-23 05:59:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>525.x (Safari 3.2)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="James Wheare">james</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>erich.ocean</cc>
    
    <cc>koivisto</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127134</commentid>
    <comment_count>0</comment_count>
    <who name="James Wheare">james</who>
    <bug_when>2009-06-20 05:47:22 -0700</bug_when>
    <thetext>Here are some headers:

==========

GET /static/playdar.js HTTP/1.1
Accept: */*
Cache-Control: no-cache
Pragma: no-cache

HTTP/1.1 200 OK
Date: Sat, 20 Jun 2009 12:31:40 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 mod_fastcgi/2.4.2
Last-Modified: Sat, 20 Jun 2009 12:14:32 GMT
Etag: &quot;e0b6011-11ba0-46cc6955bfa00&quot;
Accept-Ranges: bytes
Content-Length: 72608
Connection: close
Content-Type: application/javascript

==========

GET /static/playdar.js HTTP/1.1
Accept: */*
Cache-Control: max-age=0
If-Modified-Since: Sat, 20 Jun 2009 12:14:32 GMT
If-None-Match: &quot;e0b6011-11ba0-46cc6955bfa00&quot;

HTTP/1.1 304 Not Modified
Date: Sat, 20 Jun 2009 12:31:32 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 mod_fastcgi/2.4.2
Connection: close
Etag: &quot;e0b6011-11ba0-46cc6955bfa00&quot;

==========

With the first request, the MIME type is correctly identified as javascript, but with the second, the server returns 304 Not Modified and the browsers uses its cached file, but fails to interpret the MIME type of the file stored in cache. Web Inspector shows this warning:

(!) Resource interpreted as other but transferred with MIME type application/x-javascript.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127340</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-06-22 05:08:07 -0700</bug_when>
    <thetext>Could you provide steps to reproduce this issue with some live web site?

See also: bug 22084.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127342</commentid>
    <comment_count>2</comment_count>
    <who name="James Wheare">james</who>
    <bug_when>2009-06-22 05:14:06 -0700</bug_when>
    <thetext>http://www.playdar.org/

Empty cache. Then alt-shift-refresh. MIME type correctly detected.

Now just apple-r normal refresh. Notice the warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127343</commentid>
    <comment_count>3</comment_count>
    <who name="James Wheare">james</who>
    <bug_when>2009-06-22 05:15:21 -0700</bug_when>
    <thetext>Actually it seems to work sporadically each time you apple-r. But usually at least every other refresh will give you the error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134082</commentid>
    <comment_count>4</comment_count>
      <attachid>33326</attachid>
    <who name="Erich Ocean">erich.ocean</who>
    <bug_when>2009-07-23 05:41:11 -0700</bug_when>
    <thetext>Created attachment 33326
patch to detect Scripts correctly even when they&apos;re not currently cached</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134083</commentid>
    <comment_count>5</comment_count>
    <who name="Erich Ocean">erich.ocean</who>
    <bug_when>2009-07-23 05:42:16 -0700</bug_when>
    <thetext>It&apos;d be great if someone could pick this up and push it through the process who&apos;s already set up to do so. I don&apos;t have the time to push through a two-line commit, given the amount of work my 5-minute (!) read of the committer guidelines seemed to indicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134084</commentid>
    <comment_count>6</comment_count>
    <who name="Erich Ocean">erich.ocean</who>
    <bug_when>2009-07-23 05:59:13 -0700</bug_when>
    <thetext>This is also related to https://bugs.webkit.org/show_bug.cgi?id=22084</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>33326</attachid>
            <date>2009-07-23 05:41:11 -0700</date>
            <delta_ts>2009-07-23 05:52:52 -0700</delta_ts>
            <desc>patch to detect Scripts correctly even when they&apos;re not currently cached</desc>
            <filename>0001-need-to-test-this-change.patch</filename>
            <type>text/plain</type>
            <size>1123</size>
            <attacher name="Erich Ocean">erich.ocean</attacher>
            
              <data encoding="base64">RnJvbSA1YjY5ZTRlN2JhNzdlNWM3NjZkMGMxY2EwZDE1NGNiYTE3MWIxMGQwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBFcmljaCBPY2VhbiA8ZXJpY2gub2NlYW5AbWUuY29tPgpEYXRl
OiBUaHUsIDIzIEp1bCAyMDA5IDA1OjM2OjIwIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gbmVlZCB0
byB0ZXN0IHRoaXMgY2hhbmdlCgotLS0KIFdlYkNvcmUvaW5zcGVjdG9yL0luc3BlY3RvclJlc291
cmNlLmNwcCB8ICAgIDUgKysrKysKIDEgZmlsZXMgY2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAw
IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL1dl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