[epiphany] downloads: Fix ephy_download_get_content_type() to actually return the content type
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] downloads: Fix ephy_download_get_content_type() to actually return the content type
- Date: Mon, 26 Oct 2015 11:10:54 +0000 (UTC)
commit 06a42adcb6fb2c5ce9c5500e87c5fbb480c69ade
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed Oct 7 10:18:33 2015 +0200
downloads: Fix ephy_download_get_content_type() to actually return the content type
It was returning the MIME type.
embed/ephy-download.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index b3364e9..868a4fb 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -157,12 +157,15 @@ ephy_download_get_content_type (EphyDownload *download)
response = webkit_download_get_response (download->priv->download);
if (response) {
- content_type = g_strdup (webkit_uri_response_get_mime_type (response));
+ const char *mime_type = webkit_uri_response_get_mime_type (response);
- LOG ("ephy_download_get_content_type: WebKit: %s", content_type);
+ LOG ("ephy_download_get_content_type: WebKit mime type: %s", mime_type);
- if (content_type)
- return content_type;
+ if (mime_type) {
+ content_type = g_content_type_from_mime_type (mime_type);
+ if (content_type)
+ return content_type;
+ }
}
destination_uri = webkit_download_get_destination (download->priv->download);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]