[evolution-data-server] Bug #623936 - 75 second delay when creating new DAV entries in Zimbra



commit 17941a9b9d6d4024505bc8c2a6601083e73edf66
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jul 12 16:16:32 2010 +0200

    Bug #623936 - 75 second delay when creating new DAV entries in Zimbra

 .../backends/webdav/e-book-backend-webdav.c        |   17 +++++++++--------
 calendar/backends/caldav/e-cal-backend-caldav.c    |    3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index 92667af..7b18ad6 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -145,8 +145,8 @@ download_contact(EBookBackendWebdav *webdav, const gchar *uri)
 	guint        status;
 
 	message = soup_message_new(SOUP_METHOD_GET, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	status = soup_session_send_message(webdav->priv->session, message);
 	if (status != 200) {
@@ -206,8 +206,8 @@ upload_contact(EBookBackendWebdav *webdav, EContact *contact)
 	}
 
 	message = soup_message_new(SOUP_METHOD_PUT, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	property = e_source_get_property(source, "avoid_ifmatch");
 	if (property != NULL && strcmp(property, "1") == 0) {
@@ -366,8 +366,8 @@ delete_contact(EBookBackendWebdav *webdav, const gchar *uri)
 	guint        status;
 
 	message = soup_message_new(SOUP_METHOD_DELETE, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	status = soup_session_send_message(webdav->priv->session, message);
 	g_object_unref(message);
@@ -655,8 +655,8 @@ send_propfind(EBookBackendWebdav *webdav)
 		"<propfind xmlns=\"DAV:\"><prop><getetag/></prop></propfind>";
 
 	message = soup_message_new(SOUP_METHOD_PROPFIND, priv->uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 	soup_message_headers_append(message->request_headers, "Depth", "1");
 	soup_message_set_request(message, "text/xml", SOUP_MEMORY_TEMPORARY,
 			(gchar *) request, strlen(request));
@@ -757,6 +757,7 @@ check_addressbook_changed (EBookBackendWebdav *webdav, gchar **new_ctag)
 		return TRUE;
 
 	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 	soup_message_headers_append (message->request_headers, "Depth", "0");
 	soup_message_set_request (message, "text/xml", SOUP_MEMORY_TEMPORARY, (gchar *) request, strlen (request));
 	soup_session_send_message (priv->session, message);
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index 4d112b9..be73950 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -893,11 +893,14 @@ send_and_handle_redirection (SoupSession *soup_session, SoupMessage *msg, gchar
 {
 	gchar *old_uri = NULL;
 
+	g_return_if_fail (msg != NULL);
+
 	if (new_location)
 		old_uri = soup_uri_to_string (soup_message_get_uri (msg), FALSE);
 
 	soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
 	soup_message_add_header_handler (msg, "got_body", "Location", G_CALLBACK (redirect_handler), soup_session);
+	soup_message_headers_append (msg->request_headers, "Connection", "close");
 	soup_session_send_message (soup_session, msg);
 
 	if (new_location) {



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