Bug 173923 - [GTK] Blank page when expected "source" XML
Summary: [GTK] Blank page when expected "source" XML
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-28 07:31 PDT by Bastien Nocera
Modified: 2017-07-03 06:54 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2017-06-28 07:31:56 PDT
Opening http://ftp.gnome.org/pub/GNOME/teams/releng/3.18.0/gnome-suites-core-deps-3.18.0.modules in MiniBrowser leads to a blank page.

No content-type seems to be set on the server end, but the browser tries to load it as XML anyway.
Comment 1 Bastien Nocera 2017-06-28 07:32:08 PDT
webkitgtk4-2.16.4-1.fc26.x86_64
Comment 2 Carlos Garcia Campos 2017-06-29 02:24:16 PDT
(In reply to Bastien Nocera from comment #0)
> Opening
> http://ftp.gnome.org/pub/GNOME/teams/releng/3.18.0/gnome-suites-core-deps-3.
> 18.0.modules in MiniBrowser leads to a blank page.
> 
> No content-type seems to be set on the server end, but the browser tries to
> load it as XML anyway.

I think it's the opposite, it tries to load it as HTML instead of XML. I think this is what the soup sniffer gives to us. In case of xml document soup considers it as a HTML document unless it's a RSS/RDF feed. I don't know why, though.
Comment 3 Dan Winship 2017-07-03 06:38:47 PDT
(In reply to Carlos Garcia Campos from comment #2)
> I think it's the opposite, it tries to load it as HTML instead of XML. I
> think this is what the soup sniffer gives to us. In case of xml document
> soup considers it as a HTML document unless it's a RSS/RDF feed. I don't
> know why, though.

It looks like there's a bug/typo in the tables in soup-content-sniffer.c:

	{ TRUE, FALSE,
	  (const guchar *)"\x00\xFF\xFF\xFF\xFF\xFF",
	  (const guchar *)" <?xml",
	  5,
	  "text/html",
	  TRUE },

"text/html" should obviously be "text/xml"... Fixed in git.
Comment 4 Michael Catanzaro 2017-07-03 06:54:37 PDT
OK, thanks Dan!