diff options
author | Adrian Perez de Castro <aperez@igalia.com> | 2018-06-13 02:27:37 +0200 |
---|---|---|
committer | Adrian Perez de Castro <aperez@igalia.com> | 2018-06-13 09:23:30 +0200 |
commit | f66d47cd5b535157cd8e96646c2300724537ca3d (patch) | |
tree | 7010fb984bd6178d4bd26ab9040afce9f3db9358 /libsoup | |
parent | 9e84e84142e15a6201fb226222052003d5e659d6 (diff) | |
download | libsoup-f66d47cd5b535157cd8e96646c2300724537ca3d.tar.gz |
Set default cookie path when origin is NULL and value not present in parsed text
This patch makes the implementation of soup_cookie_parse() match the
behaviour described in the API reference documentation, which reads:
If origin is NULL, path will default to "/", but domain will be left as NULL.
Fixes #1
Diffstat (limited to 'libsoup')
-rw-r--r-- | libsoup/soup-cookie.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c index 1d0dde3c..7cea82e5 100644 --- a/libsoup/soup-cookie.c +++ b/libsoup/soup-cookie.c @@ -299,6 +299,8 @@ parse_one_cookie (const char *header, SoupURI *origin) slash - origin->path); } } + } else if (!cookie->path) { + cookie->path = g_strdup ("/"); } return cookie; |