mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 15:29:45 +03:00
Move the p->parent check in urldb to before the cookie loop. Prevents the cookie stuff exploding on domain cookies with no path. Fixes breakage with visiting launchpad.net
svn path=/trunk/netsurf/; revision=3368
This commit is contained in:
parent
c2619b5850
commit
18edcf5a40
@ -2460,6 +2460,18 @@ char *urldb_get_cookie(const char *url)
|
||||
}
|
||||
}
|
||||
|
||||
if (!p->parent) {
|
||||
/* No parent, so bail here. This can't go in
|
||||
* the loop exit condition as we also want to
|
||||
* process the top-level node.
|
||||
*
|
||||
* If p->parent is NULL then p->cookies are
|
||||
* the domain cookies and thus we don't even
|
||||
* try matching against them.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
/* Consider p itself - may be the result of Path=/foo */
|
||||
for (c = p->cookies; c; c = c->next) {
|
||||
if (c->expires != 1 && c->expires < now)
|
||||
@ -2491,12 +2503,6 @@ char *urldb_get_cookie(const char *url)
|
||||
count++;
|
||||
}
|
||||
|
||||
if (!p->parent) {
|
||||
/* No parent, so bail here. This can't go in the
|
||||
* loop exit condition as we want to process the
|
||||
* top-level node, too */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// LOG(("%s", ret));
|
||||
|
Loading…
Reference in New Issue
Block a user