File bgo-518920-exchange-authentication.patch of Package evolution-data-server
--- a/servers/exchange/lib/e2k-context.c 2009/01/12 18:05:42 9924
+++ a/servers/exchange/lib/e2k-context.c 2009/01/12 18:05:56 9925
@@ -613,8 +613,31 @@
g_free (suri->path);
suri->path = g_strdup (value);
action = soup_uri_to_string (suri, FALSE);
- soup_uri_decode (action);
soup_uri_free (suri);
+ } else if (strncmp(value, "http", 4) != 0) {
+ SoupURI *suri;
+ char *path_end;
+ const char *location;
+
+ location = soup_message_headers_get (failed_msg->response_headers,
+ "Location");
+ if (location != NULL) {/*Make sure we can get absolute path*/
+ suri = soup_uri_new (location);
+ if (suri != NULL) {/*Valid URI*/
+ if (!suri->path || strchr (suri->path, '/') == NULL)
+ goto failed;
+
+ path_end = strrchr (suri->path, '/') + 1;
+ *path_end = '\0';
+ suri->path = g_realloc (suri->path,
+ path_end - suri->path + strlen (value) + 1);
+ strcat (suri->path, value);
+ g_free (suri->query);
+ suri->query = NULL;
+ action = soup_uri_to_string (suri, FALSE);
+ soup_uri_free (suri);
+ }
+ }
} else
action = g_strdup (value);
xmlFree (value);