Bug 160347
| Summary: | html files downloaded rather than displayed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | orbisvicis |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | bugs-noreply, bugzilla, mcatanzaro |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugzilla.gnome.org/show_bug.cgi?id=769312 https://bugs.webkit.org/show_bug.cgi?id=202321 https://bugs.webkit.org/show_bug.cgi?id=239597 |
||
orbisvicis
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:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The related epiphany bug (redirects to here):
https://bugzilla.gnome.org/show_bug.cgi?id=769312
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
orbisvicis
All HTML doctypes work, all XHTML doctypes fail.
orbisvicis
XHTML doctypes work if the file suffix is ".xhtml" rather than ".html"
Michael Catanzaro
I wonder if it could be a regression from https://cgit.freedesktop.org/xdg/shared-mime-info/commit/?id=4961dc3e48d13c0c675ad7c135419b864813ca55
Michael Catanzaro
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?
orbisvicis
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Hello Heading</h1>
<p>Hello paragraph.</p>
</body>
</html>
#2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<h1>Hello Heading</h1>
<p>Hello paragraph.</p>
</body>
</html>
Michael Catanzaro
Yeah, both get displayed normally for me... I'm also on F24 with the same shared-mime-info package. I don't know what might account for this difference.
Bastien Nocera
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.
Michael Catanzaro
(In reply to Bastien Nocera from comment #7)
> The patch in https://bugs.freedesktop.org/show_bug.cgi?id=107637 adds *.html
> as a glob for XHTML files.
OK, so can this bug be closed now?
> The files with this glob should then be
> differentiated using magic.
What does this mean?
Bastien Nocera
(In reply to Michael Catanzaro from comment #8)
> (In reply to Bastien Nocera from comment #7)
> > The patch in https://bugs.freedesktop.org/show_bug.cgi?id=107637 adds *.html
> > as a glob for XHTML files.
>
> OK, so can this bug be closed now?
Up to you, did you test the bug with that shared-mime-info fix?
> > The files with this glob should then be
> > differentiated using magic.
>
> What does this mean?
That the file type magic will be used to differentiate types with the same glob.
Michael Catanzaro
(In reply to Bastien Nocera from comment #9)
> 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.