[libdmapsharing] Remove Connection and User-Agent from headers: dmap_connection_get_headers()



commit 979aa2d2f2b1635c355381a1abd6ba1fb0c642f1
Author: W. Michael Petullo <mike flyn org>
Date:   Thu Jul 29 16:04:30 2010 -0500

    Remove Connection and User-Agent from headers: dmap_connection_get_headers()
    
    Connection and User-Agent are added by GStreamer's SOUP source and perhaps
    other libraries. This change allows libdmapsharing to play nicely. See
    also https://bugzilla.gnome.org/show_bug.cgi?id=620070
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dmap-connection.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 2017716..9aa3c1b 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -382,6 +382,11 @@ dmap_connection_build_message (DMAPConnection *connection,
 	message->request_headers =
 		dmap_connection_get_headers (connection, uri_str);
 
+	soup_message_headers_append (message->request_headers,
+				    "User-Agent", DMAP_USER_AGENT);
+	soup_message_headers_append (message->request_headers,
+				    "Connection", "close");
+
 	soup_uri_free (uri);
 	g_free (uri_str);
 
@@ -1628,7 +1633,6 @@ dmap_connection_get_headers (DMAPConnection *connection,
 
 	soup_message_headers_append (headers, "Accept", "*/*");
 	soup_message_headers_append (headers, "Cache-Control", "no-cache");
-	soup_message_headers_append (headers, "User-Agent", DMAP_USER_AGENT);
 	soup_message_headers_append (headers, "Accept-Language",
 				    "en-us, en;q=5.0");
 	soup_message_headers_append (headers, "Client-DAAP-Access-Index",
@@ -1641,8 +1645,6 @@ dmap_connection_get_headers (DMAPConnection *connection,
 				     request_id);
 	g_free (request_id);
 
-	soup_message_headers_append (headers, "Connection", "close");
-
 	if (priv->password_protected) {
 		char *h;
 		char *user_pass;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]