<?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>246131</bug_id>
          
          <creation_ts>2022-10-05 19:32:43 -0700</creation_ts>
          <short_desc>Accept image/jpg for compatibility reasons</short_desc>
          <delta_ts>2022-10-07 07:38:02 -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>Images</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=13154</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>annevk</cc>
    
    <cc>cdumez</cc>
    
    <cc>marcosc</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1903649</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-10-05 19:32:43 -0700</bug_when>
    <thetext>Some servers seems to send JPEG images as `image/jpg`
The correct Content Type is `image/jpeg` per RFC.
https://www.iana.org/assignments/media-types/media-types.xhtml#image
https://www.rfc-editor.org/rfc/rfc2046.html

It may create web compatibility breakages. 
It would be good to assess the level of breakages it creates.

* Both Firefox and Chrome accepts `image/jpg` for displaying JPEG images.
* Safari is downloading the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903657</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-10-05 20:10:09 -0700</bug_when>
    <thetext>&lt;rdar://problem/100835192&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903695</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-10-06 02:16:21 -0700</bug_when>
    <thetext>There is history into this:

It seems to be available already on iOS.
https://searchfox.org/wubkat/rev/e8e9be7353991aee7df45aa62f0e0148f16e6f9f/Source/WebCore/platform/MIMETypeRegistry.cpp#74-93</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903696</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-10-06 02:17:09 -0700</bug_when>
    <thetext>Forgotten
https://searchfox.org/wubkat/rev/e8e9be7353991aee7df45aa62f0e0148f16e6f9f/Source/WebCore/platform/MIMETypeRegistry.cpp#108-112</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903766</commentid>
    <comment_count>4</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2022-10-06 09:09:13 -0700</bug_when>
    <thetext>I&apos;m actually surprised we don&apos;t resort to sniffing here, but I suppose that&apos;s because we&apos;re given a MIME type? In that case we probably want to claim support for this MIME type even if it&apos;s non-standard. HTML could probably be more specific about the MIME types here. It currently has &quot;A supported image, video, or audio type&quot; in the navigate algorithm which isn&apos;t great. (Separately it suggests `image/*` are image MIME types for a different algorithm, but claiming all of them might also not be what we want for navigate or what other browsers implement.)

https://github.com/web-platform-tests/wpt/pull/30403 has some work-in-progress tests for sniffing-related cases where there&apos;s also download-vs-display differences.

https://github.com/whatwg/html/issues/7420 discusses a similar issue for XML MIME types.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903835</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-10-06 12:25:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5100</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904044</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-07 07:37:59 -0700</bug_when>
    <thetext>Committed 255268@main (0d17dc0c310f): &lt;https://commits.webkit.org/255268@main&gt;

Reviewed commits have been landed. Closing PR #5100 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>