summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-01-14 10:46:54 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-01-14 10:46:54 +0000
commit0c4f4fde6d044389fc4ab54050513c22c4af8283 (patch)
treef2ed8af3a73e738cbd2a42b4c4704efb51d66e79
parentbe9164ecbd5cc1bad10f8ece8b8fbaacd9f312a3 (diff)
downloadgvfs-0c4f4fde6d044389fc4ab54050513c22c4af8283.tar.gz
Only set "ssl" key in dav case.
2008-01-14 Alexander Larsson <alexl@redhat.com> * client/httpuri.c: (http_from_uri): Only set "ssl" key in dav case. svn path=/trunk/; revision=1120
-rw-r--r--ChangeLog6
-rw-r--r--client/httpuri.c13
2 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 85177d93..41e78dac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
2008-01-14 Alexander Larsson <alexl@redhat.com>
* client/httpuri.c:
+ (http_from_uri):
+ Only set "ssl" key in dav case.
+
+2008-01-14 Alexander Larsson <alexl@redhat.com>
+
+ * client/httpuri.c:
(http_to_uri_scheme):
Fix some crashes
diff --git a/client/httpuri.c b/client/httpuri.c
index 9c4cff75..7f04b6c1 100644
--- a/client/httpuri.c
+++ b/client/httpuri.c
@@ -70,17 +70,14 @@ http_from_uri (GVfsUriMapper *mapper,
const char *uri_str)
{
GVfsUriMountInfo *info;
- gboolean ssl;
- char *path;
+ char *path;
+ gboolean ssl;
if (!g_ascii_strncasecmp (uri_str, "http", 4))
{
- ssl = !g_ascii_strncasecmp (uri_str, "https", 5);
info = g_vfs_uri_mount_info_new ("http");
- path = g_strdup ("/");
-
g_vfs_uri_mount_info_set (info, "uri", uri_str);
-
+ path = g_strdup ("/");
}
else
{
@@ -93,6 +90,7 @@ http_from_uri (GVfsUriMapper *mapper,
info = g_vfs_uri_mount_info_new ("dav");
ssl = !g_ascii_strcasecmp (uri->scheme, "davs");
+ g_vfs_uri_mount_info_set (info, "ssl", ssl ? "true" : "false");
if (uri->host && *uri->host)
g_vfs_uri_mount_info_set (info, "host", uri->host);
@@ -109,13 +107,12 @@ http_from_uri (GVfsUriMapper *mapper,
path = uri->path;
uri->path = NULL;
+
g_vfs_decoded_uri_free (uri);
}
info->path = path;
- g_vfs_uri_mount_info_set (info, "ssl", ssl ? "true" : "false");
-
return info;
}