Implement acceptance policies in SoupCookieJar
authorXan Lopez <xan@gnome.org>
Thu, 28 Jan 2010 16:31:08 +0000 (18:31 +0200)
committerXan Lopez <xan@gnome.org>
Wed, 3 Feb 2010 19:13:17 +0000 (21:13 +0200)
commit9deb863e27177ad47586b01be8b4e2ad91a62cc7
tree2dba7cc41a08c8af3b944ce8183bededeb7707d2
parentfe95776665b6a0d33d61951a4565b8baef84578d
Implement acceptance policies in SoupCookieJar

Through the "accept-policy" property in the jar we can now set one
among three predetermined policies: accept all cookies
(SOUP_COOKIE_JAR_ACCEPT_ALWAYS), accept none
(SOUP_COOKIE_JAR_ACCEPT_NEVER) and only accept cookies set by the main
document we are loading (SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY).

A new property, "first-party", is added to SoupMessage so that the
application using libsoup can inform us of what is the main document
URI for each message that is requested.
libsoup/soup-cookie-jar.c
libsoup/soup-cookie-jar.h
libsoup/soup-cookie.c
libsoup/soup-cookie.h
libsoup/soup-message-private.h
libsoup/soup-message.c
libsoup/soup-message.h
tests/Makefile.am
tests/cookies-test.c [new file with mode: 0644]