summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2013-08-19 18:29:33 -0300
committerDan Winship <danw@gnome.org>2013-08-25 09:04:26 -0400
commit0ea86f566b7d526c8328c7c602ae1be8cda8dd68 (patch)
treea60b0edc7c05801b4318ed656908573d8897e872
parent164e49a27eeeedca800f466b0b14a4e61a162007 (diff)
downloadlibsoup-0ea86f566b7d526c8328c7c602ae1be8cda8dd68.tar.gz
Also copy disabled features when copying messages.
https://bugzilla.gnome.org/show_bug.cgi?id=706338
-rw-r--r--libsoup/soup-cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index 815d2f71..c17e537c 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -38,6 +38,7 @@
#include "soup-content-processor.h"
#include "soup-message-private.h"
#include "soup.h"
+#include "soup-message-private.h"
/**
* SECTION:soup-cache
@@ -1345,6 +1346,8 @@ soup_cache_generate_conditional_request (SoupCache *cache, SoupMessage *original
SoupURI *uri;
SoupCacheEntry *entry;
const char *last_modified, *etag;
+ SoupMessagePrivate *origpriv;
+ GSList *f;
g_return_val_if_fail (SOUP_IS_CACHE (cache), NULL);
g_return_val_if_fail (SOUP_IS_MESSAGE (original), NULL);
@@ -1370,6 +1373,10 @@ soup_cache_generate_conditional_request (SoupCache *cache, SoupMessage *original
(SoupMessageHeadersForeachFunc)copy_headers,
msg->request_headers);
+ origpriv = SOUP_MESSAGE_GET_PRIVATE (original);
+ for (f = origpriv->disabled_features; f; f = f->next)
+ soup_message_disable_feature (msg, (GType) GPOINTER_TO_SIZE (f->data));
+
if (last_modified)
soup_message_headers_append (msg->request_headers,
"If-Modified-Since",