HSTSPolicy

#SoupHSTSPolicy implements HTTP policies, as described by <ulink url="http://tools.ietf.org/html/rfc6797">RFC 6797</ulink>.

To have a #SoupSession handle HSTS policies for your appliction automatically, use a #SoupHSTSEnforcer.

Constructors

this
this(SoupHSTSPolicy* soupHSTSPolicy, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string domain, ulong maxAge, bool includeSubdomains)

Creates a new #SoupHSTSPolicy with the given attributes.

this
this(Message msg)

Parses @msg's first "Strict-Transport-Security" response header and returns a #SoupHSTSPolicy.

this
this(string domain, ulong maxAge, Date expires, bool includeSubdomains)

Full version of #soup_hsts_policy_new(), to use with an existing expiration date. See #soup_hsts_policy_new() for details.

this
this(string domain, bool includeSubdomains)

Creates a new session #SoupHSTSPolicy with the given attributes. A session policy is a policy that is valid during the lifetime of the #SoupHSTSEnforcer it is added to. Contrary to regular policies, it has no expiration date and is not stored in persistent enforcers. These policies are useful for user-agent to load their own or user-defined rules.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

copy
HSTSPolicy copy()

Copies @policy.

equal
bool equal(HSTSPolicy policy2)

Tests if @policy1 and @policy2 are equal.

free
void free()

Frees @policy.

getDomain
string getDomain()

Gets @policy's domain.

getHSTSPolicyStruct
SoupHSTSPolicy* getHSTSPolicyStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

includesSubdomains
bool includesSubdomains()

Gets whether @policy include its subdomains.

isExpired
bool isExpired()

Gets whether @policy is expired. Permanent policies never expire.

isSessionPolicy
bool isSessionPolicy()

Gets whether @policy is a non-permanent, non-expirable session policy. see soup_hsts_policy_new_session_policy() for details.

Properties

domain
string domain [@property getter]
string domain [@property setter]

The domain or hostname that the policy applies to

expires
Date expires [@property getter]
Date expires [@property setter]

the policy expiration time, or %NULL for a permanent session policy

includeSubdomains
bool includeSubdomains [@property getter]
bool includeSubdomains [@property setter]

%TRUE if the policy applies on subdomains

maxAge
ulong maxAge [@property getter]
ulong maxAge [@property setter]

The maximum age, in seconds, that the policy is valid

Static functions

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
soupHSTSPolicy
SoupHSTSPolicy* soupHSTSPolicy;

the main Gtk struct

Meta

Since

2.68