fix the path checking
authorDan Winship <danw@src.gnome.org>
Fri, 2 May 2008 18:10:10 +0000 (18:10 +0000)
committerDan Winship <danw@src.gnome.org>
Fri, 2 May 2008 18:10:10 +0000 (18:10 +0000)
* libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path
checking

svn path=/trunk/; revision=1141

ChangeLog
libsoup/soup-cookie.c

index 52492f1..de1d8ab 100644 (file)
--- 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
index f29ab88..e6f364d 100644 (file)
@@ -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;