summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-07-26 11:25:17 +0100
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-10-26 15:58:56 +0000
commit8082321c9d2c8e1f8bb8a679219af1507f297b1a (patch)
treed78487ccf3fd7f2676017b88d1376fdedd0b409c
parentf6f99e22a8200adfc6011156231eec57af44027c (diff)
downloadgvfs-8082321c9d2c8e1f8bb8a679219af1507f297b1a.tar.gz
http: Always set the file type to regular
Always set the file type to regular so that querying the type of an input stream gives the expected result. https://bugzilla.gnome.org/show_bug.cgi?id=632296
-rw-r--r--daemon/gvfsbackendhttp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 2056a4a3..0db563f4 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -543,12 +543,13 @@ file_info_from_message (SoupMessage *msg,
if (soup_message_headers_get_encoding(msg->response_headers) == SOUP_ENCODING_CONTENT_LENGTH)
g_file_info_set_size (info, soup_message_headers_get_content_length (msg->response_headers));
+ g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
+
text = soup_message_headers_get_content_type (msg->response_headers, NULL);
if (text)
{
GIcon *icon;
- g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
g_file_info_set_content_type (info, text);
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);