Bug#722279: [devhelp] [devhelp] RE: devhelp: Error accessing gtkmm-3.0 reference manual

OmegaPhil OmegaPhil at startmail.com
Tue Mar 21 20:10:18 UTC 2017


Package: devhelp
Version: 3.22.0-1+b1

After weeks of fighting this, I finally have the solution. For static
HTML rendering its stupidly overcomplicated - the code involved in the
failure goes devhelp (C) -> libwebkit (C++), including spawning 2 extra
processes) -> libsoup (C) -> glib (C), which is why it took so long.

tldr: Its not a devhelp problem but libwebkit is a bit too restrictive
in what it decides is content it can show.

When libwebkit2gtk is deciding whether it can show the file requested or
not, it checks
Source/WebCore/platform/MIMETypeRegistry.cpp:MIMETypeRegistry::canShowMIMEType
- if the MIME type determined for the requested resource doesn't start
with 'text/', it is dropped immediately. The breaking documentation is
XHTML rather than the usual HTML, which got me interested immediately.

On this machine, the MIME type returned is
'application/x-extension-html' - the MIME type is determined in
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:sendRequestCallback,
which calls libsoup soup_request_get_content_type, the result I think is
set in libsoup/soup-request-file.c:soup_request_file_send, which runs
g_file_query_info on the file, then g_file_info_get_content_type and
finally g_content_type_get_mime_type. These functions are from glib,
which call into functions maintained in the gio/xdgmime directory.

So clearly something has registered this odd MIME type in the MIME type
cache - to check for the dodgy MIME type:

=======================================================================

grep -a 'application/x-extension-xhtml' ~/.local/share/mime/mime.cache
/usr/local/share/mime/mime.cache /usr/share/mime/mime.cache

=======================================================================

This brought up some clear WINE-related hit in
'~/.local/share/mime/mime.cache' for me.

The associated MIME type config XML is in
'~/.local/share/mime/packages', 'user-extension-html.xml' was the
culprit - killing this file then running:

========================================

update-mime-database ~/.local/share/mime

========================================

finally allowed the documentation to render.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20170321/369245ce/attachment-0001.sig>


More information about the pkg-gnome-maintainers mailing list