From a1eb436848f7514182e2441b5f4ab5005d24e7c6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 2 May 2008 18:10:10 +0000 Subject: [PATCH] fix the path checking * libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path checking svn path=/trunk/; revision=1141 --- ChangeLog | 5 +++++ libsoup/soup-cookie.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52492f1..de1d8ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-02 Dan Winship + + * libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path + checking + 2008-04-29 Tor Lillqvist * libsoup/soup-dns.c (soup_dns_is_ip_address): Fix compilation diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c index f29ab88..e6f364d 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; -- 2.7.4