[libsoup] soup-cache: use the proper Content-Type when returning data from cache
- From: Sergio Villar Senin <svillar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] soup-cache: use the proper Content-Type when returning data from cache
- Date: Mon, 4 Jun 2012 07:23:24 +0000 (UTC)
commit 623c67919fbb078942058c2d739cb10d9432e45d
Author: Sergio Villar Senin <svillar igalia com>
Date: Fri Jun 1 19:38:51 2012 +0200
soup-cache: use the proper Content-Type when returning data from cache
This does not completely fixes the content-type handling by the cache as it
does not take into account the sniffed content type. Anyway trying to return
something from the original message was clearly wrong as it was not sent.
Better use the Content-Type from the 304 response.
libsoup/soup-request-http.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-request-http.c b/libsoup/soup-request-http.c
index 86a9010..9e7c945 100644
--- a/libsoup/soup-request-http.c
+++ b/libsoup/soup-request-http.c
@@ -162,7 +162,7 @@ conditional_get_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_
/* FIXME: this is wrong; the cache won't have
* the sniffed type.
*/
- sadata->http->priv->content_type = g_strdup (soup_message_headers_get_content_type (sadata->original->response_headers, NULL));
+ sadata->http->priv->content_type = g_strdup (soup_message_headers_get_content_type (msg->response_headers, NULL));
g_simple_async_result_complete (sadata->simple);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]