aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-06-19 16:26:19 +0800
committerDan Vrátil <dvratil@redhat.com>2012-06-19 16:27:05 +0800
commit9e88dd64e742d19ab133477921d7c20b9654ee0b (patch)
treea7928677bea3d91865d018f77afda66555a67458 /mail
parente3966e7034c7e11da5616968f30d5194aa6fc5c3 (diff)
downloadgsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar.gz
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar.bz2
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar.lz
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar.xz
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.tar.zst
gsoc2013-evolution-9e88dd64e742d19ab133477921d7c20b9654ee0b.zip
Bug #678293 - Already downloaded images are not shown
Diffstat (limited to 'mail')
-rw-r--r--mail/e-http-request.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index 734496b8fa..682b80626c 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -224,6 +224,7 @@ handle_http_request (GSimpleAsyncResult *res,
CamelStream *cache_stream;
GHashTable *query;
+ gint uri_len;
if (g_cancellable_is_cancelled (cancellable)) {
return;
@@ -250,8 +251,15 @@ handle_http_request (GSimpleAsyncResult *res,
evo_uri = soup_uri_to_string (soup_uri, FALSE);
/* Remove the "evo-" prefix from scheme */
- if (evo_uri && (strlen (evo_uri) > 5)) {
- uri = g_strdup (&evo_uri[4]);
+ uri_len = strlen (evo_uri);
+ if (evo_uri && (uri_len > 5)) {
+
+ /* Remove trailing "?" if there is no URI query */
+ if (evo_uri[uri_len - 1] == '?') {
+ uri = g_strndup (evo_uri + 4, uri_len - 5);
+ } else {
+ uri = g_strdup (evo_uri + 4);
+ }
g_free (evo_uri);
}