Creates a new #SoupCookie with the given attributes. (Use soup_cookie_set_secure() and soup_cookie_set_http_only() if you need to set those attributes on the returned cookie.)
If domain
starts with ".", that indicates a domain (which matches
the string after the ".", or any hostname that has domain
as a
suffix). Otherwise, it is a hostname and must match exactly.
max_age
is used to set the "expires" attribute on the cookie; pass
-1 to not include the attribute (indicating that the cookie expires
with the current session), 0 for an already-expired cookie, or a
lifetime in seconds. You can use the constants
%SOUP_COOKIE_MAX_AGE_ONE_HOUR, %SOUP_COOKIE_MAX_AGE_ONE_DAY,
%SOUP_COOKIE_MAX_AGE_ONE_WEEK and %SOUP_COOKIE_MAX_AGE_ONE_YEAR (or
multiples thereof) to calculate this value. (If you really care
about setting the exact time that the cookie will expire, use
soup_cookie_set_expires().)
cookie name
cookie value
cookie domain or hostname
cookie path, or %NULL
max age of the cookie, or -1 for a session cookie
Checks if the cookie'
s domain and host
match in the sense that
cookie
should be sent when making a request to host,
or that
cookie
should be accepted when receiving a response from host
.
a URI
Frees cookie
Gets cookie'
s domain
Gets cookie'
s HttpOnly attribute
Gets cookie'
s name
Gets cookie'
s path
Returns the same-site policy for this cookie.
Gets cookie'
s secure attribute
Gets cookie'
s value
Sets cookie'
s domain to domain
the new domain
Sets cookie'
s HttpOnly attribute to http_only
. If %TRUE, cookie
will be marked as "http only", meaning it should not be exposed to
web page scripts or other untrusted code.
the new value for the HttpOnly attribute
Sets cookie'
s max age to max_age
. If max_age
is -1, the cookie
is a session cookie, and will expire at the end of the client's
session. Otherwise, it is the number of seconds until the cookie
expires. You can use the constants %SOUP_COOKIE_MAX_AGE_ONE_HOUR,
%SOUP_COOKIE_MAX_AGE_ONE_DAY, %SOUP_COOKIE_MAX_AGE_ONE_WEEK and
%SOUP_COOKIE_MAX_AGE_ONE_YEAR (or multiples thereof) to calculate
this value. (A value of 0 indicates that the cookie should be
considered already-expired.)
(This sets the same property as soup_cookie_set_expires().)
the new max age
Sets cookie'
s name to name
the new name
Sets cookie'
s path to path
the new path
When used in conjunction with soup_cookie_jar_get_cookie_list_with_same_site_info() this sets the policy of when this cookie should be exposed.
a #SoupSameSitePolicy
Sets cookie'
s secure attribute to secure
. If %TRUE, cookie
will
only be transmitted from the client to the server over secure
(https) connections.
the new value for the secure attribute
Sets cookie'
s value to value
the new value
Serializes cookie
in the format used by the Cookie header (ie, for
returning a cookie from a #SoupSession to a server).
Serializes cookie
in the format used by the Set-Cookie header
(ie, for sending a cookie from a #SoupServer to a client).
Creates a new #SoupCookie with the given attributes. (Use soup_cookie_set_secure() and soup_cookie_set_http_only() if you need to set those attributes on the returned cookie.)
If domain
starts with ".", that indicates a domain (which matches
the string after the ".", or any hostname that has domain
as a
suffix). Otherwise, it is a hostname and must match exactly.
max_age
is used to set the "expires" attribute on the cookie; pass
-1 to not include the attribute (indicating that the cookie expires
with the current session), 0 for an already-expired cookie, or a
lifetime in seconds. You can use the constants
%SOUP_COOKIE_MAX_AGE_ONE_HOUR, %SOUP_COOKIE_MAX_AGE_ONE_DAY,
%SOUP_COOKIE_MAX_AGE_ONE_WEEK and %SOUP_COOKIE_MAX_AGE_ONE_YEAR (or
multiples thereof) to calculate this value. (If you really care
about setting the exact time that the cookie will expire, use
soup_cookie_set_expires().)
cookie name
cookie value
cookie domain or hostname
cookie path, or %NULL
max age of the cookie, or -1 for a session cookie
Parses header
and returns a #SoupCookie. (If header
contains
multiple cookies, only the first one will be parsed.)
If header
does not have "path" or "domain" attributes, they will
be defaulted from origin
. If origin
is %NULL, path will default
to "/", but domain will be left as %NULL. Note that this is not a
valid state for a #SoupCookie, and you will need to fill in some
appropriate string for the domain if you want to actually make use
of the cookie.
a cookie string (eg, the value of a Set-Cookie header)
origin of the cookie, or %NULL
An HTTP cookie.
name
andvalue
will be set for all cookies. If the cookie is generated from a string that appears to have no name, thenname
will be the empty string.domain
andpath
give the host or domain, and path within that host/domain, to restrict this cookie to. Ifdomain
starts with ".", that indicates a domain (which matches the string after the ".", or any hostname that hasdomain
as a suffix). Otherwise, it is a hostname and must match exactly.expires
will be non-%NULL if the cookie uses either the original "expires" attribute, or the newer "max-age" attribute. Ifexpires
is %NULL, it indicates that neither "expires" nor "max-age" was specified, and the cookie expires at the end of the session.If
http_only
is set, the cookie should not be exposed to untrusted code (eg, javascript), so as to minimize the danger posed by cross-site scripting attacks.