<?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>160347</bug_id>
          
          <creation_ts>2016-07-29 10:53:32 -0700</creation_ts>
          <short_desc>html files downloaded rather than displayed</short_desc>
          <delta_ts>2022-04-21 06:21:01 -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>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=769312</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=202321</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=239597</see_also>
          <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>1</everconfirmed>
          <reporter>orbisvicis</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>bugzilla</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1215598</commentid>
    <comment_count>0</comment_count>
    <who name="">orbisvicis</who>
    <bug_when>2016-07-29 10:53:32 -0700</bug_when>
    <thetext>version: WebKit 2.12.3 from Epiphany 3.20.3

This doctype causes webkit to download the HTML file instead of rendering it in-browser:

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

The related epiphany bug (redirects to here):

https://bugzilla.gnome.org/show_bug.cgi?id=769312</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215603</commentid>
    <comment_count>1</comment_count>
    <who name="">orbisvicis</who>
    <bug_when>2016-07-29 10:59:56 -0700</bug_when>
    <thetext>All HTML doctypes work, all XHTML doctypes fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215608</commentid>
    <comment_count>2</comment_count>
    <who name="">orbisvicis</who>
    <bug_when>2016-07-29 11:07:40 -0700</bug_when>
    <thetext>XHTML doctypes work if the file suffix is &quot;.xhtml&quot; rather than &quot;.html&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215682</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-29 13:10:07 -0700</bug_when>
    <thetext>I wonder if it could be a regression from https://cgit.freedesktop.org/xdg/shared-mime-info/commit/?id=4961dc3e48d13c0c675ad7c135419b864813ca55</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215850</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-30 09:15:11 -0700</bug_when>
    <thetext>Strange, seems to work fine for me with the same Epiphany and WebKit versions. Did you find any example of a broken site on the Internet? What version of shared-mime-info do you have?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215947</commentid>
    <comment_count>5</comment_count>
    <who name="">orbisvicis</who>
    <bug_when>2016-07-31 09:02:52 -0700</bug_when>
    <thetext>shared-mime-info.x86_64 1.6-1.fc24

This bug report is only applicable to local files (file:///), I forgot to mention. Test files:

#1

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
  &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;h1&gt;Hello Heading&lt;/h1&gt;
        &lt;p&gt;Hello paragraph.&lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;

#2

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
  &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html&gt;
    &lt;body&gt;
        &lt;h1&gt;Hello Heading&lt;/h1&gt;
        &lt;p&gt;Hello paragraph.&lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215967</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-31 14:27:45 -0700</bug_when>
    <thetext>Yeah, both get displayed normally for me... I&apos;m also on F24 with the same shared-mime-info package. I don&apos;t know what might account for this difference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1452025</commentid>
    <comment_count>7</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2018-08-21 04:13:52 -0700</bug_when>
    <thetext>The patch in https://bugs.freedesktop.org/show_bug.cgi?id=107637 adds *.html as a glob for XHTML files. The files with this glob should then be differentiated using magic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1452081</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-08-21 06:57:09 -0700</bug_when>
    <thetext>(In reply to Bastien Nocera from comment #7)
&gt; The patch in https://bugs.freedesktop.org/show_bug.cgi?id=107637 adds *.html
&gt; as a glob for XHTML files.

OK, so can this bug be closed now?

&gt; The files with this glob should then be
&gt; differentiated using magic.

What does this mean?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1454751</commentid>
    <comment_count>9</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2018-08-29 05:17:59 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; (In reply to Bastien Nocera from comment #7)
&gt; &gt; The patch in https://bugs.freedesktop.org/show_bug.cgi?id=107637 adds *.html
&gt; &gt; as a glob for XHTML files.
&gt; 
&gt; OK, so can this bug be closed now?

Up to you, did you test the bug with that shared-mime-info fix?

&gt; &gt; The files with this glob should then be
&gt; &gt; differentiated using magic.
&gt; 
&gt; What does this mean?

That the file type magic will be used to differentiate types with the same glob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1454761</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-08-29 07:34:26 -0700</bug_when>
    <thetext>(In reply to Bastien Nocera from comment #9)
&gt; Up to you, did you test the bug with that shared-mime-info fix?

I was never able to reproduce it in the first place.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>