[goffice] Use GsfInputHTTP to open files over HTTP instead of GIO. [see #724970]



commit db595a350a847b2bbb3dcf33747104bdf8dbe840
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Mar 6 16:07:39 2014 +0100

    Use GsfInputHTTP to open files over HTTP instead of GIO. [see #724970]

 ChangeLog               |    5 +++++
 goffice/utils/go-file.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6f232f8..3ff3350 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-06  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/utils/go-file.c (go_file_open): use GsfInputHTTP for URLs
+       starting with "http://"; or "https://";. [see #724970]
+
 2014-03-05  Jean Brefort  <jean brefort normalesup org>
 
        * configure.ac: add test for lsm_itex_to_mathml
diff --git a/goffice/utils/go-file.c b/goffice/utils/go-file.c
index c5111fb..6213950 100644
--- a/goffice/utils/go-file.c
+++ b/goffice/utils/go-file.c
@@ -595,6 +595,11 @@ go_file_open (char const *uri, GError **err)
                return result;
        }
 
+       /* for now, GIO seems unable to retrieve files properly using http(s)
+        * see https://bugzilla.gnome.org/show_bug.cgi?id=724970 */
+       if (!g_ascii_strncasecmp (uri, "http://";, 7) || !g_ascii_strncasecmp (uri, "https://";, 8))
+               return gsf_input_http_new (uri, err);
+
        return gsf_input_gio_new_for_uri (uri, err);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]