evolution-data-server r9925 - in branches/gnome-2-24/servers/exchange: . lib
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9925 - in branches/gnome-2-24/servers/exchange: . lib
- Date: Mon, 12 Jan 2009 18:05:56 +0000 (UTC)
Author: mcrha
Date: Mon Jan 12 18:05:56 2009
New Revision: 9925
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9925&view=rev
Log:
2009-01-12 Chow Loong Jin <hyperair gmail com>
** Fix for bug #518920
* servers/exchange/lib/e2k-context.c (e2k_context_fba):
Handle relative URIs in value of action attribute of form in
form-based authentication.
Modified:
branches/gnome-2-24/servers/exchange/ChangeLog
branches/gnome-2-24/servers/exchange/lib/e2k-context.c
Modified: branches/gnome-2-24/servers/exchange/lib/e2k-context.c
==============================================================================
--- branches/gnome-2-24/servers/exchange/lib/e2k-context.c (original)
+++ branches/gnome-2-24/servers/exchange/lib/e2k-context.c Mon Jan 12 18:05:56 2009
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]