/* midori-hsts.c generated by valac 0.38.8, the Vala compiler
 * generated from midori-hsts.vala, do not modify */

/*
 Copyright (C) 2012 Christian Dywan <christian@twotoasts.de>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include <glib.h>
#include <glib-object.h>
#include <libsoup/soup.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <stdio.h>
#include <gobject/gvaluecollector.h>


#define MIDORI_TYPE_HSTS (midori_hsts_get_type ())
#define MIDORI_HSTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_HSTS, MidoriHSTS))
#define MIDORI_HSTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_HSTS, MidoriHSTSClass))
#define MIDORI_IS_HSTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_HSTS))
#define MIDORI_IS_HSTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_HSTS))
#define MIDORI_HSTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_HSTS, MidoriHSTSClass))

typedef struct _MidoriHSTS MidoriHSTS;
typedef struct _MidoriHSTSClass MidoriHSTSClass;
typedef struct _MidoriHSTSPrivate MidoriHSTSPrivate;

#define MIDORI_HSTS_TYPE_DIRECTIVE (midori_hsts_directive_get_type ())
#define MIDORI_HSTS_DIRECTIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_HSTS_TYPE_DIRECTIVE, MidoriHSTSDirective))
#define MIDORI_HSTS_DIRECTIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_HSTS_TYPE_DIRECTIVE, MidoriHSTSDirectiveClass))
#define MIDORI_HSTS_IS_DIRECTIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_HSTS_TYPE_DIRECTIVE))
#define MIDORI_HSTS_IS_DIRECTIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_HSTS_TYPE_DIRECTIVE))
#define MIDORI_HSTS_DIRECTIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_HSTS_TYPE_DIRECTIVE, MidoriHSTSDirectiveClass))

typedef struct _MidoriHSTSDirective MidoriHSTSDirective;
typedef struct _MidoriHSTSDirectiveClass MidoriHSTSDirectiveClass;
enum  {
	MIDORI_HSTS_0_PROPERTY,
	MIDORI_HSTS_NUM_PROPERTIES
};
static GParamSpec* midori_hsts_properties[MIDORI_HSTS_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _midori_hsts_directive_unref0(var) ((var == NULL) ? NULL : (var = (midori_hsts_directive_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _MidoriHstsReadCacheData MidoriHstsReadCacheData;
typedef struct _MidoriHSTSDirectivePrivate MidoriHSTSDirectivePrivate;
typedef struct _MidoriHstsAppendToCacheData MidoriHstsAppendToCacheData;
#define __vala_SoupDate_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupDate_free (var), NULL)))
typedef struct _MidoriHSTSParamSpecDirective MidoriHSTSParamSpecDirective;

struct _MidoriHSTS {
	GObject parent_instance;
	MidoriHSTSPrivate * priv;
};

struct _MidoriHSTSClass {
	GObjectClass parent_class;
};

struct _MidoriHSTSPrivate {
	GHashTable* whitelist;
	gboolean debug;
};

struct _MidoriHstsReadCacheData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	MidoriHSTS* self;
	GFile* file;
	GFileInputStream* _tmp0_;
	GFile* _tmp1_;
	GFileInputStream* _tmp2_;
	GDataInputStream* stream;
	GDataInputStream* _tmp3_;
	gchar* line;
	GDataInputStream* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar** parts;
	const gchar* _tmp7_;
	gchar** _tmp8_;
	gchar** _tmp9_;
	gint parts_length1;
	gint _parts_size_;
	gboolean _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	const gchar* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	const gchar* _tmp14_;
	MidoriHSTSDirective* directive;
	gchar** _tmp15_;
	gint _tmp15__length1;
	const gchar* _tmp16_;
	MidoriHSTSDirective* _tmp17_;
	MidoriHSTSDirective* _tmp18_;
	gboolean _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	const gchar* _tmp21_;
	MidoriHSTSDirective* _tmp22_;
	GError* _error_;
	GError * _inner_error_;
};

struct _MidoriHSTSDirective {
	GTypeInstance parent_instance;
	volatile int ref_count;
	MidoriHSTSDirectivePrivate * priv;
	SoupDate* expires;
	gboolean sub_domains;
};

struct _MidoriHSTSDirectiveClass {
	GTypeClass parent_class;
	void (*finalize) (MidoriHSTSDirective *self);
};

struct _MidoriHstsAppendToCacheData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	MidoriHSTS* self;
	gchar* host;
	gchar* header;
	gboolean _tmp0_;
	gchar* filename;
	gchar* _tmp1_;
	GFile* file;
	const gchar* _tmp2_;
	GFile* _tmp3_;
	GFileOutputStream* stream;
	GFile* _tmp4_;
	GFileOutputStream* _tmp5_;
	GFileOutputStream* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	guint8* _tmp15_;
	gint _tmp15__length1;
	guint8* _tmp16_;
	gint _tmp16__length1;
	GFileOutputStream* _tmp17_;
	GError* _error_;
	const gchar* _tmp18_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	GError * _inner_error_;
};

struct _MidoriHSTSParamSpecDirective {
	GParamSpec parent_instance;
};


static gpointer midori_hsts_parent_class = NULL;
static gpointer midori_hsts_directive_parent_class = NULL;
static SoupSessionFeatureInterface * midori_hsts_soup_session_feature_parent_iface = NULL;

GType midori_hsts_get_type (void) G_GNUC_CONST;
gpointer midori_hsts_directive_ref (gpointer instance);
void midori_hsts_directive_unref (gpointer instance);
GParamSpec* midori_hsts_param_spec_directive (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void midori_hsts_value_set_directive (GValue* value, gpointer v_object);
void midori_hsts_value_take_directive (GValue* value, gpointer v_object);
gpointer midori_hsts_value_get_directive (const GValue* value);
GType midori_hsts_directive_get_type (void) G_GNUC_CONST;
#define MIDORI_HSTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_HSTS, MidoriHSTSPrivate))
MidoriHSTS* midori_hsts_new (void);
MidoriHSTS* midori_hsts_construct (GType object_type);
static void _g_free0_ (gpointer var);
static void _midori_hsts_directive_unref0_ (gpointer var);
static void midori_hsts_read_cache (MidoriHSTS* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void midori_hsts_read_cache_finish (MidoriHSTS* self, GAsyncResult* _res_);
gchar* midori_paths_get_preset_filename (const gchar* folder, const gchar* filename);
gchar* midori_paths_get_config_filename_for_reading (const gchar* filename);
static void midori_hsts_read_cache_data_free (gpointer _data);
static void midori_hsts_read_cache_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data);
static gboolean midori_hsts_read_cache_co (MidoriHstsReadCacheData* _data_);
static void midori_hsts_read_cache_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
MidoriHSTSDirective* midori_hsts_directive_new_from_header (const gchar* header);
MidoriHSTSDirective* midori_hsts_directive_construct_from_header (GType object_type, const gchar* header);
gboolean midori_hsts_directive_is_valid (MidoriHSTSDirective* self);
static void midori_hsts_append_to_whitelist (MidoriHSTS* self, const gchar* host, MidoriHSTSDirective* directive);
static gboolean midori_hsts_real_add_feature (SoupSessionFeature* base, GType type);
static gboolean midori_hsts_real_remove_feature (SoupSessionFeature* base, GType type);
static gboolean midori_hsts_real_has_feature (SoupSessionFeature* base, GType type);
static void midori_hsts_real_attach (SoupSessionFeature* base, SoupSession* session);
static void midori_hsts_queued (MidoriHSTS* self, SoupSession* session, SoupMessage* message);
static void _midori_hsts_queued_soup_session_request_queued (SoupSession* _sender, SoupMessage* msg, gpointer self);
static void midori_hsts_real_detach (SoupSessionFeature* base, SoupSession* session);
static void midori_hsts_real_request_started (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg, SoupSocket* socket);
static void midori_hsts_real_request_queued (SoupSessionFeature* base, SoupSession* session, SoupMessage* message);
static void midori_hsts_real_request_unqueued (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg);
static gboolean midori_hsts_should_secure_host (MidoriHSTS* self, const gchar* host);
static void midori_hsts_strict_transport_security_handled (MidoriHSTS* self, SoupMessage* message);
static void _midori_hsts_strict_transport_security_handled_soup_message_finished (SoupMessage* _sender, gpointer self);
static void midori_hsts_append_to_cache_data_free (gpointer _data);
static void midori_hsts_append_to_cache_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data);
static void midori_hsts_append_to_cache (MidoriHSTS* self, const gchar* host, const gchar* header, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void midori_hsts_append_to_cache_finish (MidoriHSTS* self, GAsyncResult* _res_);
static gboolean midori_hsts_append_to_cache_co (MidoriHstsAppendToCacheData* _data_);
gboolean midori_paths_is_readonly (void);
gchar* midori_paths_get_config_filename_for_writing (const gchar* filename);
static void midori_hsts_append_to_cache_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _vala_SoupDate_free (SoupDate* self);
MidoriHSTSDirective* midori_hsts_directive_new (gboolean include_sub_domains);
MidoriHSTSDirective* midori_hsts_directive_construct (GType object_type, gboolean include_sub_domains);
static void midori_hsts_directive_finalize (MidoriHSTSDirective * obj);
static void midori_hsts_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static void _g_free0_ (gpointer var) {
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	var = (g_free (var), NULL);
#line 243 "midori-hsts.c"
}


static void _midori_hsts_directive_unref0_ (gpointer var) {
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	(var == NULL) ? NULL : (var = (midori_hsts_directive_unref (var), NULL));
#line 250 "midori-hsts.c"
}


MidoriHSTS* midori_hsts_construct (GType object_type) {
	MidoriHSTS * self = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp10_;
	GCompareFunc _tmp11_;
	const gchar* _tmp12_;
	gint _tmp13_;
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) g_object_new (object_type, NULL);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = g_str_hash;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = g_str_equal;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _midori_hsts_directive_unref0_);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_hash_table_unref0 (self->priv->whitelist);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->priv->whitelist = _tmp2_;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = midori_paths_get_preset_filename (NULL, "hsts");
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = _tmp3_;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp5_ = g_file_new_for_path (_tmp4_);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_read_cache (self, _tmp6_, NULL, NULL);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_tmp6_);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_tmp4_);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp7_ = midori_paths_get_config_filename_for_reading ("hsts");
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp8_ = _tmp7_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp9_ = g_file_new_for_path (_tmp8_);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp10_ = _tmp9_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_read_cache (self, _tmp10_, NULL, NULL);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_tmp10_);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_tmp8_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp11_ = g_strcmp0;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp12_ = g_getenv ("MIDORI_DEBUG");
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp13_ = _tmp11_ (_tmp12_, "hsts");
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp13_ == 0) {
#line 50 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		self->priv->debug = TRUE;
#line 320 "midori-hsts.c"
	}
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return self;
#line 324 "midori-hsts.c"
}


MidoriHSTS* midori_hsts_new (void) {
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return midori_hsts_construct (MIDORI_TYPE_HSTS);
#line 331 "midori-hsts.c"
}


static void midori_hsts_read_cache_data_free (gpointer _data) {
	MidoriHstsReadCacheData* _data_;
	_data_ = _data;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->file);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->self);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_slice_free (MidoriHstsReadCacheData, _data_);
#line 344 "midori-hsts.c"
}


static void midori_hsts_read_cache_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data) {
	MidoriHstsReadCacheData* _task_data_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_task_data_ = g_task_get_task_data (G_TASK (res));
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_task_data_->_callback_ != NULL) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_task_data_->_callback_ (source_object, res, user_data);
#line 356 "midori-hsts.c"
	}
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_task_data_->_task_complete_ = TRUE;
#line 360 "midori-hsts.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return self ? g_object_ref (self) : NULL;
#line 367 "midori-hsts.c"
}


static void midori_hsts_read_cache (MidoriHSTS* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriHstsReadCacheData* _data_;
	MidoriHSTS* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = g_slice_new0 (MidoriHstsReadCacheData);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_callback_ = _callback_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, midori_hsts_read_cache_async_ready_wrapper, _user_data_);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_callback_ == NULL) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_task_complete_ = TRUE;
#line 386 "midori-hsts.c"
	}
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_task_set_task_data (_data_->_async_result, _data_, midori_hsts_read_cache_data_free);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->self = _tmp0_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = file;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->file);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->file = _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_read_cache_co (_data_);
#line 404 "midori-hsts.c"
}


static void midori_hsts_read_cache_finish (MidoriHSTS* self, GAsyncResult* _res_) {
	MidoriHstsReadCacheData* _data_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 412 "midori-hsts.c"
}


static void midori_hsts_read_cache_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriHstsReadCacheData* _data_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = _user_data_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_source_object_ = source_object;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_res_ = _res_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_task_complete_ = TRUE;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_read_cache_co (_data_);
#line 428 "midori-hsts.c"
}


static gboolean midori_hsts_read_cache_co (MidoriHstsReadCacheData* _data_) {
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	switch (_data_->_state_) {
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 0:
#line 437 "midori-hsts.c"
		goto _state_0;
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 1:
#line 441 "midori-hsts.c"
		goto _state_1;
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 2:
#line 445 "midori-hsts.c"
		goto _state_2;
		default:
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_assert_not_reached ();
#line 450 "midori-hsts.c"
	}
	_state_0:
	{
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp1_ = _data_->file;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_state_ = 1;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_file_read_async (_data_->_tmp1_, G_PRIORITY_DEFAULT, NULL, midori_hsts_read_cache_ready, _data_);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 462 "midori-hsts.c"
		_state_1:
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp2_ = g_file_read_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp0_ = _data_->_tmp2_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 470 "midori-hsts.c"
			goto __catch0_g_error;
		}
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp3_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp0_);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->stream = _data_->_tmp3_;
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		while (TRUE) {
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp4_ = _data_->stream;
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_state_ = 2;
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			g_data_input_stream_read_line_async (_data_->_tmp4_, G_PRIORITY_DEFAULT, NULL, midori_hsts_read_cache_ready, _data_);
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			return FALSE;
#line 487 "midori-hsts.c"
			_state_2:
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp5_ = g_data_input_stream_read_line_finish (_data_->_tmp4_, _data_->_res_, NULL, &_data_->_inner_error_);
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->line = _data_->_tmp5_;
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_g_object_unref0 (_data_->stream);
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_g_object_unref0 (_data_->_tmp0_);
#line 499 "midori-hsts.c"
				goto __catch0_g_error;
			}
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp6_ = _data_->line;
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			if (_data_->_tmp6_ == NULL) {
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_g_free0 (_data_->line);
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				break;
#line 510 "midori-hsts.c"
			}
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp7_ = _data_->line;
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp9_ = _data_->_tmp8_ = g_strsplit (_data_->_tmp7_, " ", 2);
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->parts = _data_->_tmp9_;
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->parts_length1 = _vala_array_length (_data_->_tmp8_);
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_parts_size_ = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp11_ = _data_->parts;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp11__length1 = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp12_ = _data_->_tmp11_[0];
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			if (_data_->_tmp12_ == NULL) {
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp10_ = TRUE;
#line 532 "midori-hsts.c"
			} else {
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp13_ = _data_->parts;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp13__length1 = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp14_ = _data_->_tmp13_[1];
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp10_ = _data_->_tmp14_ == NULL;
#line 542 "midori-hsts.c"
			}
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			if (_data_->_tmp10_) {
#line 62 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), NULL);
#line 62 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_g_free0 (_data_->line);
#line 62 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				break;
#line 552 "midori-hsts.c"
			}
#line 63 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp15_ = _data_->parts;
#line 63 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp15__length1 = _data_->parts_length1;
#line 63 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp16_ = _data_->_tmp15_[1];
#line 63 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp17_ = midori_hsts_directive_new_from_header (_data_->_tmp16_);
#line 63 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->directive = _data_->_tmp17_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp18_ = _data_->directive;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->_tmp19_ = midori_hsts_directive_is_valid (_data_->_tmp18_);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			if (_data_->_tmp19_) {
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp20_ = _data_->parts;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp20__length1 = _data_->parts_length1;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp21_ = _data_->_tmp20_[0];
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				_data_->_tmp22_ = _data_->directive;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				midori_hsts_append_to_whitelist (_data_->self, _data_->_tmp21_, _data_->_tmp22_);
#line 580 "midori-hsts.c"
			}
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_midori_hsts_directive_unref0 (_data_->directive);
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), NULL);
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_free0 (_data_->line);
#line 588 "midori-hsts.c"
		}
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->stream);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->_tmp0_);
#line 594 "midori-hsts.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_inner_error_ = NULL;
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_error_free0 (_data_->_error_);
#line 605 "midori-hsts.c"
	}
	__finally0:
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_clear_error (&_data_->_inner_error_);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_object_unref (_data_->_async_result);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 618 "midori-hsts.c"
	}
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_data_->_state_ != 0) {
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 628 "midori-hsts.c"
		}
	}
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_object_unref (_data_->_async_result);
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return FALSE;
#line 635 "midori-hsts.c"
}


static gboolean midori_hsts_real_add_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	result = FALSE;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return result;
#line 648 "midori-hsts.c"
}


static gboolean midori_hsts_real_remove_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	result = FALSE;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return result;
#line 661 "midori-hsts.c"
}


static gboolean midori_hsts_real_has_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 74 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 74 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	result = FALSE;
#line 74 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return result;
#line 674 "midori-hsts.c"
}


static void _midori_hsts_queued_soup_session_request_queued (SoupSession* _sender, SoupMessage* msg, gpointer self) {
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_queued ((MidoriHSTS*) self, _sender, msg);
#line 681 "midori-hsts.c"
}


static void midori_hsts_real_attach (SoupSessionFeature* base, SoupSession* session) {
	MidoriHSTS * self;
	SoupSession* _tmp0_;
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = session;
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_signal_connect_object (_tmp0_, "request-queued", (GCallback) _midori_hsts_queued_soup_session_request_queued, self, 0);
#line 696 "midori-hsts.c"
}


static void midori_hsts_real_detach (SoupSessionFeature* base, SoupSession* session) {
	MidoriHSTS * self;
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 706 "midori-hsts.c"
}


static void midori_hsts_real_request_started (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg, SoupSocket* socket) {
	MidoriHSTS * self;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (msg != NULL);
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (socket != NULL);
#line 720 "midori-hsts.c"
}


static void midori_hsts_real_request_queued (SoupSessionFeature* base, SoupSession* session, SoupMessage* message) {
	MidoriHSTS * self;
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (message != NULL);
#line 732 "midori-hsts.c"
}


static void midori_hsts_real_request_unqueued (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg) {
	MidoriHSTS * self;
#line 82 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 82 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 82 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (msg != NULL);
#line 744 "midori-hsts.c"
}


static gpointer _midori_hsts_directive_ref0 (gpointer self) {
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return self ? midori_hsts_directive_ref (self) : NULL;
#line 751 "midori-hsts.c"
}


static gboolean midori_hsts_should_secure_host (MidoriHSTS* self, const gchar* host) {
	gboolean result = FALSE;
	MidoriHSTSDirective* directive = NULL;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_;
	MidoriHSTSDirective* _tmp3_;
	MidoriHSTSDirective* _tmp4_;
	gboolean _tmp11_ = FALSE;
	MidoriHSTSDirective* _tmp12_;
#line 84 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 84 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (host != NULL, FALSE);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = self->priv->whitelist;
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = _midori_hsts_directive_ref0 ((MidoriHSTSDirective*) _tmp2_);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	directive = _tmp3_;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = directive;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp4_ == NULL) {
#line 783 "midori-hsts.c"
		GHashTable* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gconstpointer _tmp9_;
		MidoriHSTSDirective* _tmp10_;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp5_ = self->priv->whitelist;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp6_ = host;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp7_ = g_strconcat ("*.", _tmp6_, NULL);
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp8_ = _tmp7_;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp9_ = g_hash_table_lookup (_tmp5_, _tmp8_);
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp10_ = _midori_hsts_directive_ref0 ((MidoriHSTSDirective*) _tmp9_);
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_midori_hsts_directive_unref0 (directive);
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		directive = _tmp10_;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_tmp8_);
#line 808 "midori-hsts.c"
	}
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp12_ = directive;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp12_ != NULL) {
#line 814 "midori-hsts.c"
		MidoriHSTSDirective* _tmp13_;
		gboolean _tmp14_;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp13_ = directive;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp14_ = midori_hsts_directive_is_valid (_tmp13_);
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp11_ = _tmp14_;
#line 823 "midori-hsts.c"
	} else {
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp11_ = FALSE;
#line 827 "midori-hsts.c"
	}
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	result = _tmp11_;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_midori_hsts_directive_unref0 (directive);
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return result;
#line 835 "midori-hsts.c"
}


static void _midori_hsts_strict_transport_security_handled_soup_message_finished (SoupMessage* _sender, gpointer self) {
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_strict_transport_security_handled ((MidoriHSTS*) self, _sender);
#line 842 "midori-hsts.c"
}


static void midori_hsts_queued (MidoriHSTS* self, SoupSession* session, SoupMessage* message) {
	SoupMessage* _tmp0_;
	SoupURI* _tmp1_;
	SoupURI* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (self != NULL);
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (message != NULL);
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = message;
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = soup_message_get_uri (_tmp0_);
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = _tmp1_;
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = _tmp2_->host;
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = midori_hsts_should_secure_host (self, _tmp3_);
#line 92 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp4_) {
#line 870 "midori-hsts.c"
		SoupMessage* _tmp5_;
		SoupURI* _tmp6_;
		SoupURI* _tmp7_;
		SoupSession* _tmp8_;
		SoupMessage* _tmp9_;
		gboolean _tmp10_;
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp5_ = message;
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp6_ = soup_message_get_uri (_tmp5_);
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp7_ = _tmp6_;
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		soup_uri_set_scheme (_tmp7_, "https");
#line 94 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp8_ = session;
#line 94 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp9_ = message;
#line 94 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		soup_session_requeue_message (_tmp8_, _tmp9_);
#line 95 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp10_ = self->priv->debug;
#line 95 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (_tmp10_) {
#line 895 "midori-hsts.c"
			FILE* _tmp11_;
			SoupMessage* _tmp12_;
			SoupURI* _tmp13_;
			SoupURI* _tmp14_;
			const gchar* _tmp15_;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp11_ = stdout;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp12_ = message;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp13_ = soup_message_get_uri (_tmp12_);
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp14_ = _tmp13_;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp15_ = _tmp14_->host;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			fprintf (_tmp11_, "HSTS: Enforce %s\n", _tmp15_);
#line 913 "midori-hsts.c"
		}
	} else {
		SoupMessage* _tmp16_;
		SoupURI* _tmp17_;
		SoupURI* _tmp18_;
		const gchar* _tmp19_;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp16_ = message;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp17_ = soup_message_get_uri (_tmp16_);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp18_ = _tmp17_;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp19_ = _tmp18_->scheme;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (g_strcmp0 (_tmp19_, "http") == 0) {
#line 930 "midori-hsts.c"
			SoupMessage* _tmp20_;
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_tmp20_ = message;
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			g_signal_connect_object (_tmp20_, "finished", (GCallback) _midori_hsts_strict_transport_security_handled_soup_message_finished, self, 0);
#line 936 "midori-hsts.c"
		}
	}
}


static void midori_hsts_append_to_whitelist (MidoriHSTS* self, const gchar* host, MidoriHSTSDirective* directive) {
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	MidoriHSTSDirective* _tmp3_;
	MidoriHSTSDirective* _tmp4_;
	MidoriHSTSDirective* _tmp5_;
	gboolean _tmp6_;
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (self != NULL);
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (host != NULL);
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (directive != NULL);
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = self->priv->whitelist;
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = directive;
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = _midori_hsts_directive_ref0 (_tmp3_);
#line 103 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_hash_table_insert (_tmp0_, _tmp2_, _tmp4_);
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp5_ = directive;
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_->sub_domains;
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp6_) {
#line 974 "midori-hsts.c"
		GHashTable* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		MidoriHSTSDirective* _tmp10_;
		MidoriHSTSDirective* _tmp11_;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp7_ = self->priv->whitelist;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp8_ = host;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp9_ = g_strconcat ("*.", _tmp8_, NULL);
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp10_ = directive;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp11_ = _midori_hsts_directive_ref0 (_tmp10_);
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_hash_table_insert (_tmp7_, _tmp9_, _tmp11_);
#line 992 "midori-hsts.c"
	}
}


static void midori_hsts_append_to_cache_data_free (gpointer _data) {
	MidoriHstsAppendToCacheData* _data_;
	_data_ = _data;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_data_->host);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_data_->header);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->self);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_slice_free (MidoriHstsAppendToCacheData, _data_);
#line 1008 "midori-hsts.c"
}


static void midori_hsts_append_to_cache_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data) {
	MidoriHstsAppendToCacheData* _task_data_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_task_data_ = g_task_get_task_data (G_TASK (res));
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_task_data_->_callback_ != NULL) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_task_data_->_callback_ (source_object, res, user_data);
#line 1020 "midori-hsts.c"
	}
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_task_data_->_task_complete_ = TRUE;
#line 1024 "midori-hsts.c"
}


static void midori_hsts_append_to_cache (MidoriHSTS* self, const gchar* host, const gchar* header, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriHstsAppendToCacheData* _data_;
	MidoriHSTS* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = g_slice_new0 (MidoriHstsAppendToCacheData);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_callback_ = _callback_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, midori_hsts_append_to_cache_async_ready_wrapper, _user_data_);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_callback_ == NULL) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_task_complete_ = TRUE;
#line 1045 "midori-hsts.c"
	}
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_task_set_task_data (_data_->_async_result, _data_, midori_hsts_append_to_cache_data_free);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->self = _tmp0_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_data_->host);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->host = _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = header;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_data_->header);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->header = _tmp4_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_append_to_cache_co (_data_);
#line 1071 "midori-hsts.c"
}


static void midori_hsts_append_to_cache_finish (MidoriHSTS* self, GAsyncResult* _res_) {
	MidoriHstsAppendToCacheData* _data_;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 1079 "midori-hsts.c"
}


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
#line 1436 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1437 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1437 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1437 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1438 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1438 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1438 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1438 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 1123 "midori-hsts.c"
	}
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1439 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 1129 "midori-hsts.c"
}


static void midori_hsts_append_to_cache_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriHstsAppendToCacheData* _data_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_ = _user_data_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_source_object_ = source_object;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_res_ = _res_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_task_complete_ = TRUE;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_append_to_cache_co (_data_);
#line 1145 "midori-hsts.c"
}


static gboolean midori_hsts_append_to_cache_co (MidoriHstsAppendToCacheData* _data_) {
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	switch (_data_->_state_) {
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 0:
#line 1154 "midori-hsts.c"
		goto _state_0;
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 1:
#line 1158 "midori-hsts.c"
		goto _state_1;
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		case 2:
#line 1162 "midori-hsts.c"
		goto _state_2;
		default:
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_assert_not_reached ();
#line 1167 "midori-hsts.c"
	}
	_state_0:
#line 109 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_tmp0_ = midori_paths_is_readonly ();
#line 109 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_data_->_tmp0_) {
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (_data_->_state_ != 0) {
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			while (_data_->_task_complete_ != TRUE) {
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1182 "midori-hsts.c"
			}
		}
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_object_unref (_data_->_async_result);
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 1189 "midori-hsts.c"
	}
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->_tmp1_ = midori_paths_get_config_filename_for_writing ("hsts");
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_data_->filename = _data_->_tmp1_;
#line 1195 "midori-hsts.c"
	{
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp2_ = _data_->filename;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp3_ = g_file_new_for_path (_data_->_tmp2_);
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->file = _data_->_tmp3_;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp4_ = _data_->file;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp5_ = g_file_append_to (_data_->_tmp4_, G_FILE_CREATE_NONE, NULL, &_data_->_inner_error_);
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->stream = _data_->_tmp5_;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1213 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp6_ = _data_->stream;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp7_ = _data_->host;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp8_ = g_strconcat (_data_->_tmp7_, " ", NULL);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp10_ = _data_->header;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp11_ = g_strconcat (_data_->_tmp9_, _data_->_tmp10_, NULL);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp12_ = _data_->_tmp11_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp13_ = g_strconcat (_data_->_tmp12_, "\n", NULL);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp14_ = _data_->_tmp13_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp15_ = string_get_data (_data_->_tmp14_, &_data_->_tmp15__length1);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp16_ = _data_->_tmp15_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp16__length1 = _data_->_tmp15__length1;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_state_ = 1;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_output_stream_write_async ((GOutputStream*) _data_->_tmp6_, _data_->_tmp16_, (gsize) _data_->_tmp16__length1, G_PRIORITY_DEFAULT, NULL, midori_hsts_append_to_cache_ready, _data_);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 1246 "midori-hsts.c"
		_state_1:
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_output_stream_write_finish ((GOutputStream*) _data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp14_);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp12_);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp9_);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->stream);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1262 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp17_ = _data_->stream;
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_state_ = 2;
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_output_stream_flush_async ((GOutputStream*) _data_->_tmp17_, G_PRIORITY_DEFAULT, NULL, midori_hsts_append_to_cache_ready, _data_);
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 1273 "midori-hsts.c"
		_state_2:
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_output_stream_flush_finish ((GOutputStream*) _data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->stream);
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1283 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->stream);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->file);
#line 1290 "midori-hsts.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_inner_error_ = NULL;
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp18_ = _data_->filename;
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp19_ = _data_->_error_;
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_data_->_tmp20_ = _data_->_tmp19_->message;
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_critical ("midori-hsts.vala:120: Failed to update %s: %s", _data_->_tmp18_, _data_->_tmp20_);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_error_free0 (_data_->_error_);
#line 1309 "midori-hsts.c"
	}
	__finally1:
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_data_->filename);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_clear_error (&_data_->_inner_error_);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_object_unref (_data_->_async_result);
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return FALSE;
#line 1324 "midori-hsts.c"
	}
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (_data_->filename);
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_data_->_state_ != 0) {
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1336 "midori-hsts.c"
		}
	}
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_object_unref (_data_->_async_result);
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return FALSE;
#line 1343 "midori-hsts.c"
}


static gchar* bool_to_string (gboolean self) {
	gchar* result = NULL;
#line 37 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (self) {
#line 1351 "midori-hsts.c"
		gchar* _tmp0_;
#line 38 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp0_ = g_strdup ("true");
#line 38 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = _tmp0_;
#line 38 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1359 "midori-hsts.c"
	} else {
		gchar* _tmp1_;
#line 40 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp1_ = g_strdup ("false");
#line 40 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = _tmp1_;
#line 40 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1368 "midori-hsts.c"
	}
}


static void midori_hsts_strict_transport_security_handled (MidoriHSTS* self, SoupMessage* message) {
	gboolean _tmp0_ = FALSE;
	SoupMessage* _tmp1_;
	const gchar* hsts = NULL;
	SoupMessage* _tmp5_;
	SoupMessageHeaders* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	MidoriHSTSDirective* directive = NULL;
	const gchar* _tmp9_;
	MidoriHSTSDirective* _tmp10_;
	MidoriHSTSDirective* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp23_;
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (self != NULL);
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (message != NULL);
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = message;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp1_ == NULL) {
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp0_ = TRUE;
#line 1397 "midori-hsts.c"
	} else {
		SoupMessage* _tmp2_;
		SoupURI* _tmp3_;
		SoupURI* _tmp4_;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp2_ = message;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp3_ = soup_message_get_uri (_tmp2_);
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp4_ = _tmp3_;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp0_ = _tmp4_ == NULL;
#line 1410 "midori-hsts.c"
	}
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp0_) {
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return;
#line 1416 "midori-hsts.c"
	}
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp5_ = message;
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_->response_headers;
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp7_ = soup_message_headers_get_one (_tmp6_, "Strict-Transport-Security");
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	hsts = _tmp7_;
#line 129 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp8_ = hsts;
#line 129 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp8_ == NULL) {
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return;
#line 1432 "midori-hsts.c"
	}
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp9_ = hsts;
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp10_ = midori_hsts_directive_new_from_header (_tmp9_);
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	directive = _tmp10_;
#line 133 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp11_ = directive;
#line 133 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp12_ = midori_hsts_directive_is_valid (_tmp11_);
#line 133 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp12_) {
#line 1446 "midori-hsts.c"
		SoupMessage* _tmp13_;
		SoupURI* _tmp14_;
		SoupURI* _tmp15_;
		const gchar* _tmp16_;
		MidoriHSTSDirective* _tmp17_;
		SoupMessage* _tmp18_;
		SoupURI* _tmp19_;
		SoupURI* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp13_ = message;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp14_ = soup_message_get_uri (_tmp13_);
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp15_ = _tmp14_;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp16_ = _tmp15_->host;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp17_ = directive;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_append_to_whitelist (self, _tmp16_, _tmp17_);
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp18_ = message;
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp19_ = soup_message_get_uri (_tmp18_);
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp20_ = _tmp19_;
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp21_ = _tmp20_->host;
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp22_ = hsts;
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_append_to_cache (self, _tmp21_, _tmp22_, NULL, NULL);
#line 1481 "midori-hsts.c"
	}
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp23_ = self->priv->debug;
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp23_) {
#line 1487 "midori-hsts.c"
		FILE* _tmp24_;
		SoupMessage* _tmp25_;
		SoupURI* _tmp26_;
		SoupURI* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		MidoriHSTSDirective* _tmp30_;
		gboolean _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp24_ = stdout;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp25_ = message;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp26_ = soup_message_get_uri (_tmp25_);
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp27_ = _tmp26_;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp28_ = _tmp27_->host;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp29_ = hsts;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp30_ = directive;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp31_ = midori_hsts_directive_is_valid (_tmp30_);
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp32_ = bool_to_string (_tmp31_);
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp33_ = _tmp32_;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		fprintf (_tmp24_, "HSTS: '%s' sets '%s' valid? %s\n", _tmp28_, _tmp29_, _tmp33_);
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_free0 (_tmp33_);
#line 1522 "midori-hsts.c"
	}
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_midori_hsts_directive_unref0 (directive);
#line 1526 "midori-hsts.c"
}


static void _vala_SoupDate_free (SoupDate* self) {
#line 15 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_boxed_free (soup_date_get_type (), self);
#line 1533 "midori-hsts.c"
}


MidoriHSTSDirective* midori_hsts_directive_construct (GType object_type, gboolean include_sub_domains) {
	MidoriHSTSDirective* self = NULL;
	SoupDate* _tmp0_;
	gboolean _tmp1_;
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTSDirective*) g_type_create_instance (object_type);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = soup_date_new_from_now (G_MAXINT);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	__vala_SoupDate_free0 (self->expires);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->expires = _tmp0_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = include_sub_domains;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->sub_domains = _tmp1_;
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return self;
#line 1555 "midori-hsts.c"
}


MidoriHSTSDirective* midori_hsts_directive_new (gboolean include_sub_domains) {
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return midori_hsts_directive_construct (MIDORI_HSTS_TYPE_DIRECTIVE, include_sub_domains);
#line 1562 "midori-hsts.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 1582 "midori-hsts.c"
}


MidoriHSTSDirective* midori_hsts_directive_construct_from_header (GType object_type, const gchar* header) {
	MidoriHSTSDirective* self = NULL;
	GHashTable* param_list = NULL;
	const gchar* _tmp0_;
	GHashTable* _tmp1_;
	GHashTable* _tmp2_;
	gchar* max_age = NULL;
	GHashTable* _tmp3_;
	gconstpointer _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	GHashTable* _tmp12_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (header != NULL, NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = (MidoriHSTSDirective*) g_type_create_instance (object_type);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp0_ = header;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = soup_header_parse_param_list (_tmp0_);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	param_list = _tmp1_;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp2_ = param_list;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp2_ == NULL) {
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_g_hash_table_unref0 (param_list);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return self;
#line 1618 "midori-hsts.c"
	}
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp3_ = param_list;
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp4_ = g_hash_table_lookup (_tmp3_, "max-age");
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp5_ = g_strdup ((const gchar*) _tmp4_);
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	max_age = _tmp5_;
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp6_ = max_age;
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp6_ != NULL) {
#line 1632 "midori-hsts.c"
		const gchar* _tmp7_;
		gint _tmp8_;
		SoupDate* _tmp9_;
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp7_ = max_age;
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp8_ = atoi (_tmp7_);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp9_ = soup_date_new_from_now (_tmp8_);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		__vala_SoupDate_free0 (self->expires);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		self->expires = _tmp9_;
#line 1646 "midori-hsts.c"
	}
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp10_ = header;
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp11_ = string_contains (_tmp10_, "includeSubDomains");
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp11_) {
#line 33 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		self->sub_domains = TRUE;
#line 1656 "midori-hsts.c"
	}
#line 34 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp12_ = param_list;
#line 34 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	soup_header_free_param_list (_tmp12_);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_free0 (max_age);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_hash_table_unref0 (param_list);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return self;
#line 1668 "midori-hsts.c"
}


MidoriHSTSDirective* midori_hsts_directive_new_from_header (const gchar* header) {
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return midori_hsts_directive_construct_from_header (MIDORI_HSTS_TYPE_DIRECTIVE, header);
#line 1675 "midori-hsts.c"
}


gboolean midori_hsts_directive_is_valid (MidoriHSTSDirective* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	SoupDate* _tmp1_;
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_tmp1_ = self->expires;
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (_tmp1_ != NULL) {
#line 1689 "midori-hsts.c"
		SoupDate* _tmp2_;
		gboolean _tmp3_;
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp2_ = self->expires;
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp3_ = soup_date_is_past (_tmp2_);
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp0_ = !_tmp3_;
#line 1698 "midori-hsts.c"
	} else {
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		_tmp0_ = FALSE;
#line 1702 "midori-hsts.c"
	}
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	result = _tmp0_;
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return result;
#line 1708 "midori-hsts.c"
}


static void midori_hsts_value_directive_init (GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	value->data[0].v_pointer = NULL;
#line 1715 "midori-hsts.c"
}


static void midori_hsts_value_directive_free_value (GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_directive_unref (value->data[0].v_pointer);
#line 1724 "midori-hsts.c"
	}
}


static void midori_hsts_value_directive_copy_value (const GValue* src_value, GValue* dest_value) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (src_value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		dest_value->data[0].v_pointer = midori_hsts_directive_ref (src_value->data[0].v_pointer);
#line 1734 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1738 "midori-hsts.c"
	}
}


static gpointer midori_hsts_value_directive_peek_pointer (const GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return value->data[0].v_pointer;
#line 1746 "midori-hsts.c"
}


static gchar* midori_hsts_value_directive_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (collect_values[0].v_pointer) {
#line 1753 "midori-hsts.c"
		MidoriHSTSDirective * object;
		object = collect_values[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		if (object->parent_instance.g_class == NULL) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1760 "midori-hsts.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1764 "midori-hsts.c"
		}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = midori_hsts_directive_ref (object);
#line 1768 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1772 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return NULL;
#line 1776 "midori-hsts.c"
}


static gchar* midori_hsts_value_directive_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	MidoriHSTSDirective ** object_p;
	object_p = collect_values[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (!object_p) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1787 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (!value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		*object_p = NULL;
#line 1793 "midori-hsts.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		*object_p = value->data[0].v_pointer;
#line 1797 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		*object_p = midori_hsts_directive_ref (value->data[0].v_pointer);
#line 1801 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return NULL;
#line 1805 "midori-hsts.c"
}


GParamSpec* midori_hsts_param_spec_directive (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	MidoriHSTSParamSpecDirective* spec;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (g_type_is_a (object_type, MIDORI_HSTS_TYPE_DIRECTIVE), NULL);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return G_PARAM_SPEC (spec);
#line 1819 "midori-hsts.c"
}


gpointer midori_hsts_value_get_directive (const GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, MIDORI_HSTS_TYPE_DIRECTIVE), NULL);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return value->data[0].v_pointer;
#line 1828 "midori-hsts.c"
}


void midori_hsts_value_set_directive (GValue* value, gpointer v_object) {
	MidoriHSTSDirective * old;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, MIDORI_HSTS_TYPE_DIRECTIVE));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	old = value->data[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (v_object) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, MIDORI_HSTS_TYPE_DIRECTIVE));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = v_object;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_directive_ref (value->data[0].v_pointer);
#line 1848 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1852 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (old) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_directive_unref (old);
#line 1858 "midori-hsts.c"
	}
}


void midori_hsts_value_take_directive (GValue* value, gpointer v_object) {
	MidoriHSTSDirective * old;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, MIDORI_HSTS_TYPE_DIRECTIVE));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	old = value->data[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (v_object) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, MIDORI_HSTS_TYPE_DIRECTIVE));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = v_object;
#line 1877 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1881 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (old) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		midori_hsts_directive_unref (old);
#line 1887 "midori-hsts.c"
	}
}


static void midori_hsts_directive_class_init (MidoriHSTSDirectiveClass * klass) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_directive_parent_class = g_type_class_peek_parent (klass);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	((MidoriHSTSDirectiveClass *) klass)->finalize = midori_hsts_directive_finalize;
#line 1897 "midori-hsts.c"
}


static void midori_hsts_directive_instance_init (MidoriHSTSDirective * self) {
#line 15 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->expires = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->sub_domains = FALSE;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->ref_count = 1;
#line 1908 "midori-hsts.c"
}


static void midori_hsts_directive_finalize (MidoriHSTSDirective * obj) {
	MidoriHSTSDirective * self;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_HSTS_TYPE_DIRECTIVE, MidoriHSTSDirective);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_signal_handlers_destroy (self);
#line 15 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	__vala_SoupDate_free0 (self->expires);
#line 1920 "midori-hsts.c"
}


GType midori_hsts_directive_get_type (void) {
	static volatile gsize midori_hsts_directive_type_id__volatile = 0;
	if (g_once_init_enter (&midori_hsts_directive_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { midori_hsts_value_directive_init, midori_hsts_value_directive_free_value, midori_hsts_value_directive_copy_value, midori_hsts_value_directive_peek_pointer, "p", midori_hsts_value_directive_collect_value, "p", midori_hsts_value_directive_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHSTSDirectiveClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_hsts_directive_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHSTSDirective), 0, (GInstanceInitFunc) midori_hsts_directive_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType midori_hsts_directive_type_id;
		midori_hsts_directive_type_id = g_type_register_fundamental (g_type_fundamental_next (), "MidoriHSTSDirective", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&midori_hsts_directive_type_id__volatile, midori_hsts_directive_type_id);
	}
	return midori_hsts_directive_type_id__volatile;
}


gpointer midori_hsts_directive_ref (gpointer instance) {
	MidoriHSTSDirective * self;
	self = instance;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_atomic_int_inc (&self->ref_count);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	return instance;
#line 1945 "midori-hsts.c"
}


void midori_hsts_directive_unref (gpointer instance) {
	MidoriHSTSDirective * self;
	self = instance;
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		MIDORI_HSTS_DIRECTIVE_GET_CLASS (self)->finalize (self);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1958 "midori-hsts.c"
	}
}


static void midori_hsts_class_init (MidoriHSTSClass * klass) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_parent_class = g_type_class_peek_parent (klass);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	g_type_class_add_private (klass, sizeof (MidoriHSTSPrivate));
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_hsts_finalize;
#line 1970 "midori-hsts.c"
}


static void midori_hsts_soup_session_feature_interface_init (SoupSessionFeatureInterface * iface) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	midori_hsts_soup_session_feature_parent_iface = g_type_interface_peek_parent (iface);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->add_feature = (gboolean (*) (SoupSessionFeature *, GType)) midori_hsts_real_add_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->remove_feature = (gboolean (*) (SoupSessionFeature *, GType)) midori_hsts_real_remove_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->has_feature = (gboolean (*) (SoupSessionFeature *, GType)) midori_hsts_real_has_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->attach = (void (*) (SoupSessionFeature *, SoupSession*)) midori_hsts_real_attach;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->detach = (void (*) (SoupSessionFeature *, SoupSession*)) midori_hsts_real_detach;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->request_started = (void (*) (SoupSessionFeature *, SoupSession*, SoupMessage*, SoupSocket*)) midori_hsts_real_request_started;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->request_queued = (void (*) (SoupSessionFeature *, SoupSession*, SoupMessage*)) midori_hsts_real_request_queued;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	iface->request_unqueued = (void (*) (SoupSessionFeature *, SoupSession*, SoupMessage*)) midori_hsts_real_request_unqueued;
#line 1993 "midori-hsts.c"
}


static void midori_hsts_instance_init (MidoriHSTS * self) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->priv = MIDORI_HSTS_GET_PRIVATE (self);
#line 43 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self->priv->debug = FALSE;
#line 2002 "midori-hsts.c"
}


static void midori_hsts_finalize (GObject * obj) {
	MidoriHSTS * self;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_HSTS, MidoriHSTS);
#line 42 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	_g_hash_table_unref0 (self->priv->whitelist);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/katze/midori-hsts.vala"
	G_OBJECT_CLASS (midori_hsts_parent_class)->finalize (obj);
#line 2014 "midori-hsts.c"
}


GType midori_hsts_get_type (void) {
	static volatile gsize midori_hsts_type_id__volatile = 0;
	if (g_once_init_enter (&midori_hsts_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHSTSClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_hsts_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHSTS), 0, (GInstanceInitFunc) midori_hsts_instance_init, NULL };
		static const GInterfaceInfo soup_session_feature_info = { (GInterfaceInitFunc) midori_hsts_soup_session_feature_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType midori_hsts_type_id;
		midori_hsts_type_id = g_type_register_static (G_TYPE_OBJECT, "MidoriHSTS", &g_define_type_info, 0);
		g_type_add_interface_static (midori_hsts_type_id, soup_session_feature_get_type (), &soup_session_feature_info);
		g_once_init_leave (&midori_hsts_type_id__volatile, midori_hsts_type_id);
	}
	return midori_hsts_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



