[libsoup] Fix the definition of soup_message_is_keepalive() for HTTP/1.0
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoup] Fix the definition of soup_message_is_keepalive() for HTTP/1.0
- Date: Thu, 20 Aug 2009 18:17:03 +0000 (UTC)
commit 53095c541d677d0b6f96fc9becca1c1329c37975
Author: Dan Winship <danw gnome org>
Date: Thu Aug 20 14:14:52 2009 -0400
Fix the definition of soup_message_is_keepalive() for HTTP/1.0
Fixes a problem where some requests would reach 100% but never "finish"
libsoup/soup-message.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 1f0c8ac..020577a 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1369,14 +1369,13 @@ soup_message_is_keepalive (SoupMessage *msg)
return FALSE;
if (SOUP_MESSAGE_GET_PRIVATE (msg)->http_version == SOUP_HTTP_1_0) {
- /* Only persistent if the client requested keepalive
- * and the server agreed.
+ /* In theory, HTTP/1.0 connections are only persistent
+ * if the client requests it, and the server agrees.
+ * But some servers do keep-alive even if the client
+ * doesn't request it. So ignore c_conn.
*/
- if (!c_conn || !s_conn)
- return FALSE;
- if (!soup_header_contains (c_conn, "Keep-Alive") ||
- !soup_header_contains (s_conn, "Keep-Alive"))
+ if (!s_conn || !soup_header_contains (s_conn, "Keep-Alive"))
return FALSE;
} else {
/* Normally persistent unless either side requested otherwise */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]