[libsoup] SoupSession: clean up message response when queueing
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] SoupSession: clean up message response when queueing
- Date: Sat, 25 Aug 2012 12:44:32 +0000 (UTC)
commit 47744dda4fc8978aafdbdd4fc392205da6fcd668
Author: Dan Winship <danw gnome org>
Date: Fri Aug 10 10:51:34 2012 -0400
SoupSession: clean up message response when queueing
To handle messages that get reused, we were calling
soup_message_cleanup_response() from soup_message_send_request(). But
it's better to do it sooner than that, like in
soup_session_append_queue_item().
libsoup/soup-message-client-io.c | 1 -
libsoup/soup-session.c | 2 ++
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-message-client-io.c b/libsoup/soup-message-client-io.c
index 1310bb8..7c62368 100644
--- a/libsoup/soup-message-client-io.c
+++ b/libsoup/soup-message-client-io.c
@@ -150,7 +150,6 @@ soup_message_send_request (SoupMessageQueueItem *item,
async_context = NULL;
iostream = soup_socket_get_iostream (soup_connection_get_socket (item->conn));
- soup_message_cleanup_response (item->msg);
soup_message_io_client (item, iostream, async_context,
get_request_headers,
parse_response_headers,
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 4d8836b..865897e 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -1018,6 +1018,8 @@ soup_session_append_queue_item (SoupSession *session, SoupMessage *msg,
SoupMessageQueueItem *item;
SoupSessionHost *host;
+ soup_message_cleanup_response (msg);
+
item = soup_message_queue_append (priv->queue, msg, callback, user_data);
g_mutex_lock (&priv->conn_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]