HSTSPolicy

#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.

Constructors

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

Creates a new #SoupHSTSPolicy with the given attributes.

Members

Functions

copy
soup.hstspolicy.HSTSPolicy copy()

Copies policy.

equal
bool equal(soup.hstspolicy.HSTSPolicy policy2)

Tests if policy1 and policy2 are equal.

getDomain
string getDomain()

Gets policy's domain.

getExpires
glib.date_time.DateTime getExpires()

Returns the expiration date for policy.

getMaxAge
gulong getMaxAge()

Returns the max age for policy.

includesSubdomains
bool includesSubdomains()

Gets whether policy include its subdomains.

isExpired
bool isExpired()

Gets whether policy is expired.

isSessionPolicy
bool isSessionPolicy()

Gets whether policy is a non-permanent, non-expirable session policy.

Static functions

newFromResponse
soup.hstspolicy.HSTSPolicy newFromResponse(soup.message.Message msg)

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

newFull
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.

newSessionPolicy
soup.hstspolicy.HSTSPolicy newSessionPolicy(string domain, bool includeSubdomains)

Creates a new session #SoupHSTSPolicy with the given attributes.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.