summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-05-02 18:10:10 +0000
committerDan Winship <danw@src.gnome.org>2008-05-02 18:10:10 +0000
commita1eb436848f7514182e2441b5f4ab5005d24e7c6 (patch)
tree18b8071006c59dd5b6f594a8e39975c5f08ed3b4
parent8f5f2eb29113e22e8b763793bdf14a538a198264 (diff)
downloadlibsoup-a1eb436848f7514182e2441b5f4ab5005d24e7c6.tar.gz
fix the path checking
* libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path checking svn path=/trunk/; revision=1141
-rw-r--r--ChangeLog5
-rw-r--r--libsoup/soup-cookie.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 52492f1e..de1d8ab1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-02 Dan Winship <danw@gnome.org>
+
+ * libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path
+ checking
+
2008-04-29 Tor Lillqvist <tml@novell.com>
* libsoup/soup-dns.c (soup_dns_is_ip_address): Fix compilation
diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c
index f29ab885..e6f364de 100644
--- a/libsoup/soup-cookie.c
+++ b/libsoup/soup-cookie.c
@@ -847,8 +847,8 @@ soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri)
* no one is really that crazy.
*/
plen = strlen (cookie->path);
- if (strncmp (cookie->path, uri->path, plen) != 0)
- return FALSE;
+ if (cookie->path[plen - 1] == '/')
+ plen--;
if (uri->path[plen] && uri->path[plen] != '/')
return FALSE;