soup.hstspolicy

Module for [HSTSPolicy] class

Types 1

#SoupHSTSPolicy implements HTTP policies, as described by

RFC 6797.

@domain represents the host that this policy applies to. The domain must be IDNA-canonicalized. [soup.hstspolicy.HSTSPolicy.new_] and related methods will do this for you.

@max_age contains the 'max-age' value from the Strict Transport Security header and indicates the time to live of this policy, in seconds.

@expires will be non-null if the policy has been set by the host and hence has an expiry time. If @expires is null, it indicates that the policy is a permanent session policy set by the user agent.

If @include_subdomains is true, the Strict Transport Security policy must also be enforced on subdomains of @domain.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
HSTSPolicy self()Returns `this`, for use in `with` statements.
soup.hstspolicy.HSTSPolicy newFromResponse(soup.message.Message msg)Parses msg's first "Strict-Transport-Security" response header and returns a #SoupHSTSPolicy.
soup.hstspolicy.HSTSPolicy newFull(string domain, gulong maxAge, glib.date_time.DateTime expires, bool includeSubdomains)Full version of [soup.hstspolicy.HSTSPolicy.new_], to use with an existing expiration date.
soup.hstspolicy.HSTSPolicy newSessionPolicy(string domain, bool includeSubdomains)Creates a new session #SoupHSTSPolicy with the given attributes.
soup.hstspolicy.HSTSPolicy copy()Copies policy. Returns: a copy of policy
bool equal(soup.hstspolicy.HSTSPolicy policy2)Tests if policy1 and policy2 are equal.
string getDomain()Gets policy's domain. Returns: policy's domain.
glib.date_time.DateTime getExpires()Returns the expiration date for policy. Returns: A #GDateTime or null if unset
gulong getMaxAge()Returns the max age for policy. Returns: Max age in seconds
bool includesSubdomains()Gets whether policy include its subdomains. Returns: true if policy includes subdomains, false otherwise.
bool isExpired()Gets whether policy is expired.
bool isSessionPolicy()Gets whether policy is a non-permanent, non-expirable session policy.
Constructors
this(void * ptr, Flag!"Take" take)
this(string domain, gulong maxAge, bool includeSubdomains)Creates a new #SoupHSTSPolicy with the given attributes.