NEW179160
[GTK] WebKit2 Browsers fail to download apps in Citrix Receiver
https://bugs.webkit.org/show_bug.cgi?id=179160
Summary [GTK] WebKit2 Browsers fail to download apps in Citrix Receiver
bugzilla-ok
Reported 2017-11-01 23:55:31 PDT
Tried 3 WebKit2 browsers: Epiphany (Web), Surf and MiniBrowser. After connecting to Citrix server, clicking on an app icon should start by downloading the launcher.ica file. A small timer spins a couple of time at the bottom of the icon, then stops. Nothing is downloaded or run. Firefox works well. Midori, using WebKit-1, works well. Also tried Qupzilla without the Citrix software and it downloaded the launcher.ica file as expected.
Attachments
File download fails (20.14 KB, image/png)
2017-11-04 13:56 PDT, bugzilla-ok
no flags
launcher.aspx (2.57 KB, text/html)
2018-05-18 09:51 PDT, bugzilla-ok
no flags
bugzilla-ok
Comment 1 2017-11-04 13:56:29 PDT
Created attachment 326042 [details] File download fails Screenshot of error displayed by Surf-2 browser. The problem seems to be that WebKit is unable to save the launch.ica file though other downloads work fine. The failure seems to be occurring before download attempt has begun.
Michael Catanzaro
Comment 2 2017-11-04 20:23:28 PDT
I think we've established that Surf is a bad example to use for this, though, since it uses curl for downloads rather than WebKit.
bugzilla-ok
Comment 3 2018-04-24 15:29:54 PDT
Just using surf for the debug info. The problem with epiphany is that it doesn't download launch.ica - perhaps because the file can't be saved. Or maybe something else.
bugzilla-ok
Comment 4 2018-05-13 16:36:20 PDT
Rather than mess with surf, can you suggest a way for me to log the problem better with epiphany?
Michael Catanzaro
Comment 5 2018-05-14 06:38:09 PDT
I have no idea, sorry.
bugzilla-ok
Comment 6 2018-05-15 12:06:49 PDT
Are you saying that Epiphany has no ability to save logs other than gst (which was very helpful)? Is there a way to enable logging for WebKit?
Michael Catanzaro
Comment 7 2018-05-15 12:36:51 PDT
I don't there's going to be any logs relevant to this, but you could investigate https://trac.webkit.org/wiki/WebKitGTK/Debugging#Loggingsupport. It'll require a debug build.
bugzilla-ok
Comment 8 2018-05-15 13:22:55 PDT
How does WebKit know to download launch.ica instead of trying to display it as a web page? I wonder if that's maybe what's happening. The link is for "launcher.aspx" - Save Link As ("launcher.ica") works correctly! It appears that the problem is the .aspx extension not triggering a download. Maybe WebKit thinks it can process the file internally? How does WebKit decide whether to view or download a file (based on extension)?
bugzilla-ok
Comment 9 2018-05-15 14:05:05 PDT
When firefox clicks a link to launcher.aspx, a launcher.ica text file is downloaded and executed by Citrix Receiver. Firefox should be configured to open "Citrix ICA Settings File" with "wfica" (Citrix Receiver). Since the ica file is plain text, firefox reads the extension to decide what to do. How can we make this configuration with a WebKit browser?
Carlos Garcia Campos
Comment 10 2018-05-15 23:46:02 PDT
In WebKit the MIME type type is extracted, using the content type header or the sniffed content type if available and different to the one in the header. That MIME type is passed to MIMETypeRegistry::canShowMIMEType() that decides whether the mime type is supported to be shown by the view. Any text/ MIME type is supported by the view, except a few ones (see initializeUnsupportedTextMIMETypes). In ephy we start a download when canShowMIMEType() returns false.
bugzilla-ok
Comment 11 2018-05-16 02:40:57 PDT
The mime type should be application/x-ica so it would seem that Epiphany should download it. Firefox downloads it.
bugzilla-ok
Comment 12 2018-05-18 09:51:41 PDT
Created attachment 340702 [details] launcher.aspx Launcher.ica is mime type application/x-ica. But I don't think we're getting that far. The launcher.ica file is downloaded by launcher.aspx, which is text/html. It looks like WebKit is trying to view launcher.aspx or maybe misinterprets something it contains.
Note You need to log in before you can comment on or make changes to this bug.