/* midori-hsts.c generated by valac 0.26.2, 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;
#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_;
	GSimpleAsyncResult* _async_result;
	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_;
	GSimpleAsyncResult* _async_result;
	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))
enum  {
	MIDORI_HSTS_DUMMY_PROPERTY
};
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 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 (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_);
enum  {
	MIDORI_HSTS_DIRECTIVE_DUMMY_PROPERTY
};
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.10-1.i686/src/katze/midori-hsts.vala"
	var = (g_free (var), NULL);
#line 238 "midori-hsts.c"
}


static void _midori_hsts_directive_unref0_ (gpointer var) {
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	(var == NULL) ? NULL : (var = (midori_hsts_directive_unref (var), NULL));
#line 245 "midori-hsts.c"
}


MidoriHSTS* midori_hsts_construct (GType object_type) {
	MidoriHSTS * self = NULL;
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GFile* _tmp5_ = NULL;
	GFile* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GFile* _tmp9_ = NULL;
	GFile* _tmp10_ = NULL;
	GCompareFunc _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gint _tmp13_ = 0;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) g_object_new (object_type, NULL);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = g_str_hash;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = g_str_equal;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	_g_hash_table_unref0 (self->priv->whitelist);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self->priv->whitelist = _tmp2_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp3_ = midori_paths_get_preset_filename (NULL, "hsts");
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp4_ = _tmp3_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp5_ = g_file_new_for_path (_tmp4_);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_read_cache (self, _tmp6_, NULL, NULL);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_tmp6_);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_tmp4_);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp7_ = midori_paths_get_config_filename_for_reading ("hsts");
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp8_ = _tmp7_;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp9_ = g_file_new_for_path (_tmp8_);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp10_ = _tmp9_;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_read_cache (self, _tmp10_, NULL, NULL);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_tmp10_);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_tmp8_);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp11_ = g_strcmp0;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp12_ = g_getenv ("MIDORI_DEBUG");
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp13_ = _tmp11_ (_tmp12_, "hsts");
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp13_ == 0) {
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		self->priv->debug = TRUE;
#line 315 "midori-hsts.c"
	}
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return self;
#line 319 "midori-hsts.c"
}


MidoriHSTS* midori_hsts_new (void) {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return midori_hsts_construct (MIDORI_TYPE_HSTS);
#line 326 "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.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->file);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_slice_free (MidoriHstsReadCacheData, _data_);
#line 339 "midori-hsts.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return self ? g_object_ref (self) : NULL;
#line 346 "midori-hsts.c"
}


static void midori_hsts_read_cache (MidoriHSTS* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriHstsReadCacheData* _data_;
	MidoriHSTS* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = g_slice_new0 (MidoriHstsReadCacheData);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_hsts_read_cache);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_hsts_read_cache_data_free);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->self = _tmp0_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = file;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->file);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->file = _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_read_cache_co (_data_);
#line 375 "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.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 383 "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.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = _user_data_;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_source_object_ = source_object;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_res_ = _res_;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_read_cache_co (_data_);
#line 397 "midori-hsts.c"
}


static gboolean midori_hsts_read_cache_co (MidoriHstsReadCacheData* _data_) {
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	switch (_data_->_state_) {
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 0:
#line 406 "midori-hsts.c"
		goto _state_0;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 1:
#line 410 "midori-hsts.c"
		goto _state_1;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 2:
#line 414 "midori-hsts.c"
		goto _state_2;
		default:
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_assert_not_reached ();
#line 419 "midori-hsts.c"
	}
	_state_0:
	{
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp1_ = NULL;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp1_ = _data_->file;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_state_ = 1;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 433 "midori-hsts.c"
		_state_1:
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp2_ = NULL;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp0_ = _data_->_tmp2_;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 443 "midori-hsts.c"
			goto __catch0_g_error;
		}
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp3_ = NULL;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp3_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp0_);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->stream = _data_->_tmp3_;
#line 56 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		while (TRUE) {
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp4_ = NULL;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp4_ = _data_->stream;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_state_ = 2;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
			return FALSE;
#line 464 "midori-hsts.c"
			_state_2:
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp5_ = NULL;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
			_data_->line = _data_->_tmp5_;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_g_object_unref0 (_data_->stream);
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_g_object_unref0 (_data_->_tmp0_);
#line 478 "midori-hsts.c"
				goto __catch0_g_error;
			}
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp6_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp6_ = _data_->line;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			if (_data_->_tmp6_ == NULL) {
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_g_free0 (_data_->line);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				break;
#line 491 "midori-hsts.c"
			}
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp7_ = NULL;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp7_ = _data_->line;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp8_ = NULL;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp9_ = NULL;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp9_ = _data_->_tmp8_ = g_strsplit (_data_->_tmp7_, " ", 2);
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->parts_length1 = 0;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_parts_size_ = 0;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->parts = _data_->_tmp9_;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->parts_length1 = _vala_array_length (_data_->_tmp8_);
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_parts_size_ = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp11_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp11__length1 = 0;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp11_ = _data_->parts;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp11__length1 = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp12_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp12_ = _data_->_tmp11_[0];
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			if (_data_->_tmp12_ == NULL) {
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp10_ = TRUE;
#line 529 "midori-hsts.c"
			} else {
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp13_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp13__length1 = 0;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp13_ = _data_->parts;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp13__length1 = _data_->parts_length1;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp14_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp14_ = _data_->_tmp13_[1];
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp10_ = _data_->_tmp14_ == NULL;
#line 545 "midori-hsts.c"
			}
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			if (_data_->_tmp10_) {
#line 62 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
				_g_free0 (_data_->line);
#line 62 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				break;
#line 555 "midori-hsts.c"
			}
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp15_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp15__length1 = 0;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp15_ = _data_->parts;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp15__length1 = _data_->parts_length1;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp16_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp16_ = _data_->_tmp15_[1];
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp17_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp17_ = midori_hsts_directive_new_from_header (_data_->_tmp16_);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->directive = _data_->_tmp17_;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp18_ = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp18_ = _data_->directive;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp19_ = FALSE;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_data_->_tmp19_ = midori_hsts_directive_is_valid (_data_->_tmp18_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			if (_data_->_tmp19_) {
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp20_ = NULL;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp20__length1 = 0;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp20_ = _data_->parts;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp20__length1 = _data_->parts_length1;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp21_ = NULL;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp21_ = _data_->_tmp20_[0];
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp22_ = NULL;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				_data_->_tmp22_ = _data_->directive;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
				midori_hsts_append_to_whitelist (_data_->self, _data_->_tmp21_, _data_->_tmp22_);
#line 603 "midori-hsts.c"
			}
#line 56 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_midori_hsts_directive_unref0 (_data_->directive);
#line 56 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
			_g_free0 (_data_->line);
#line 611 "midori-hsts.c"
		}
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->stream);
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->_tmp0_);
#line 617 "midori-hsts.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_inner_error_ = NULL;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_error_free0 (_data_->_error_);
#line 628 "midori-hsts.c"
	}
	__finally0:
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
		g_clear_error (&_data_->_inner_error_);
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 639 "midori-hsts.c"
	}
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_data_->_state_ == 0) {
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 645 "midori-hsts.c"
	} else {
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 649 "midori-hsts.c"
	}
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_object_unref (_data_->_async_result);
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return FALSE;
#line 655 "midori-hsts.c"
}


static gboolean midori_hsts_real_add_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 73 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 73 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	result = FALSE;
#line 73 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return result;
#line 668 "midori-hsts.c"
}


static gboolean midori_hsts_real_remove_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	result = FALSE;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return result;
#line 681 "midori-hsts.c"
}


static gboolean midori_hsts_real_has_feature (SoupSessionFeature* base, GType type) {
	MidoriHSTS * self;
	gboolean result = FALSE;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	result = FALSE;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return result;
#line 694 "midori-hsts.c"
}


static void _midori_hsts_queued_soup_session_request_queued (SoupSession* _sender, SoupMessage* msg, gpointer self) {
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_queued ((MidoriHSTS*) self, _sender, msg);
#line 701 "midori-hsts.c"
}


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


static void midori_hsts_real_detach (SoupSessionFeature* base, SoupSession* session) {
	MidoriHSTS * self;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 726 "midori-hsts.c"
}


static void midori_hsts_real_request_started (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg, SoupSocket* socket) {
	MidoriHSTS * self;
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (msg != NULL);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (socket != NULL);
#line 740 "midori-hsts.c"
}


static void midori_hsts_real_request_queued (SoupSessionFeature* base, SoupSession* session, SoupMessage* message) {
	MidoriHSTS * self;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (message != NULL);
#line 752 "midori-hsts.c"
}


static void midori_hsts_real_request_unqueued (SoupSessionFeature* base, SoupSession* session, SoupMessage* msg) {
	MidoriHSTS * self;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTS*) base;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (session != NULL);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (msg != NULL);
#line 764 "midori-hsts.c"
}


static gpointer _midori_hsts_directive_ref0 (gpointer self) {
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return self ? midori_hsts_directive_ref (self) : NULL;
#line 771 "midori-hsts.c"
}


static gboolean midori_hsts_should_secure_host (MidoriHSTS* self, const gchar* host) {
	gboolean result = FALSE;
	MidoriHSTSDirective* directive = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	MidoriHSTSDirective* _tmp3_ = NULL;
	MidoriHSTSDirective* _tmp4_ = NULL;
	gboolean _tmp11_ = FALSE;
	MidoriHSTSDirective* _tmp12_ = NULL;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_val_if_fail (host != NULL, FALSE);
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = self->priv->whitelist;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp3_ = _midori_hsts_directive_ref0 ((MidoriHSTSDirective*) _tmp2_);
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	directive = _tmp3_;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp4_ = directive;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp4_ == NULL) {
#line 803 "midori-hsts.c"
		GHashTable* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gconstpointer _tmp9_ = NULL;
		MidoriHSTSDirective* _tmp10_ = NULL;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp5_ = self->priv->whitelist;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp6_ = host;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp7_ = g_strconcat ("*.", _tmp6_, NULL);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp8_ = _tmp7_;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp9_ = g_hash_table_lookup (_tmp5_, _tmp8_);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp10_ = _midori_hsts_directive_ref0 ((MidoriHSTSDirective*) _tmp9_);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_midori_hsts_directive_unref0 (directive);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		directive = _tmp10_;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_tmp8_);
#line 828 "midori-hsts.c"
	}
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp12_ = directive;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp12_ != NULL) {
#line 834 "midori-hsts.c"
		MidoriHSTSDirective* _tmp13_ = NULL;
		gboolean _tmp14_ = FALSE;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp13_ = directive;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp14_ = midori_hsts_directive_is_valid (_tmp13_);
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp11_ = _tmp14_;
#line 843 "midori-hsts.c"
	} else {
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp11_ = FALSE;
#line 847 "midori-hsts.c"
	}
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	result = _tmp11_;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_midori_hsts_directive_unref0 (directive);
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return result;
#line 855 "midori-hsts.c"
}


static void _midori_hsts_strict_transport_security_handled_soup_message_finished (SoupMessage* _sender, gpointer self) {
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_strict_transport_security_handled ((MidoriHSTS*) self, _sender);
#line 862 "midori-hsts.c"
}


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


static void midori_hsts_append_to_whitelist (MidoriHSTS* self, const gchar* host, MidoriHSTSDirective* directive) {
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	MidoriHSTSDirective* _tmp3_ = NULL;
	MidoriHSTSDirective* _tmp4_ = NULL;
	MidoriHSTSDirective* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (self != NULL);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (host != NULL);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (directive != NULL);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = self->priv->whitelist;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp3_ = directive;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp4_ = _midori_hsts_directive_ref0 (_tmp3_);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_hash_table_insert (_tmp0_, _tmp2_, _tmp4_);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp5_ = directive;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_->sub_domains;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp6_) {
#line 994 "midori-hsts.c"
		GHashTable* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		MidoriHSTSDirective* _tmp10_ = NULL;
		MidoriHSTSDirective* _tmp11_ = NULL;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp7_ = self->priv->whitelist;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp8_ = host;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp9_ = g_strconcat ("*.", _tmp8_, NULL);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp10_ = directive;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp11_ = _midori_hsts_directive_ref0 (_tmp10_);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_hash_table_insert (_tmp7_, _tmp9_, _tmp11_);
#line 1012 "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.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_data_->host);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_data_->header);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_object_unref0 (_data_->self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_slice_free (MidoriHstsAppendToCacheData, _data_);
#line 1028 "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_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = g_slice_new0 (MidoriHstsAppendToCacheData);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_hsts_append_to_cache);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_hsts_append_to_cache_data_free);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->self = _tmp0_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = host;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_data_->host);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->host = _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp3_ = header;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_data_->header);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->header = _tmp4_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_append_to_cache_co (_data_);
#line 1067 "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.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1075 "midori-hsts.c"
}


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1 = 0;
	gint _res_size_ = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 1300 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 1119 "midori-hsts.c"
	}
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 1125 "midori-hsts.c"
}


static void midori_hsts_append_to_cache_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriHstsAppendToCacheData* _data_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_ = _user_data_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_source_object_ = source_object;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_res_ = _res_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	midori_hsts_append_to_cache_co (_data_);
#line 1139 "midori-hsts.c"
}


static gboolean midori_hsts_append_to_cache_co (MidoriHstsAppendToCacheData* _data_) {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	switch (_data_->_state_) {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 0:
#line 1148 "midori-hsts.c"
		goto _state_0;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 1:
#line 1152 "midori-hsts.c"
		goto _state_1;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		case 2:
#line 1156 "midori-hsts.c"
		goto _state_2;
		default:
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_assert_not_reached ();
#line 1161 "midori-hsts.c"
	}
	_state_0:
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_tmp0_ = FALSE;
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_tmp0_ = midori_paths_is_readonly ();
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_data_->_tmp0_) {
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (_data_->_state_ == 0) {
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1174 "midori-hsts.c"
		} else {
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1178 "midori-hsts.c"
		}
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_object_unref (_data_->_async_result);
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 1184 "midori-hsts.c"
	}
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_tmp1_ = NULL;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->_tmp1_ = midori_paths_get_config_filename_for_writing ("hsts");
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_data_->filename = _data_->_tmp1_;
#line 1192 "midori-hsts.c"
	{
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp2_ = NULL;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp2_ = _data_->filename;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp3_ = NULL;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp3_ = g_file_new_for_path (_data_->_tmp2_);
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->file = _data_->_tmp3_;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp4_ = NULL;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp4_ = _data_->file;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp5_ = NULL;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp5_ = g_file_append_to (_data_->_tmp4_, G_FILE_CREATE_NONE, NULL, &_data_->_inner_error_);
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->stream = _data_->_tmp5_;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1218 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp6_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp6_ = _data_->stream;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp7_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp7_ = _data_->host;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp8_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp8_ = g_strconcat (_data_->_tmp7_, " ", NULL);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp9_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp10_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp10_ = _data_->header;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp11_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp11_ = g_strconcat (_data_->_tmp9_, _data_->_tmp10_, NULL);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp12_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp12_ = _data_->_tmp11_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp13_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp13_ = g_strconcat (_data_->_tmp12_, "\n", NULL);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp14_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp14_ = _data_->_tmp13_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp15_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp15__length1 = 0;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp15_ = string_get_data (_data_->_tmp14_, &_data_->_tmp15__length1);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp16_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp16__length1 = 0;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp16_ = _data_->_tmp15_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp16__length1 = _data_->_tmp15__length1;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_state_ = 1;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 1277 "midori-hsts.c"
		_state_1:
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_output_stream_write_finish ((GOutputStream*) _data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp14_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp12_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_data_->_tmp9_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->stream);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1293 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp17_ = NULL;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp17_ = _data_->stream;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_state_ = 2;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_output_stream_flush_async ((GOutputStream*) _data_->_tmp17_, G_PRIORITY_DEFAULT, NULL, midori_hsts_append_to_cache_ready, _data_);
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 1306 "midori-hsts.c"
		_state_2:
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_output_stream_flush_finish ((GOutputStream*) _data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->stream);
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			_g_object_unref0 (_data_->file);
#line 1316 "midori-hsts.c"
			goto __catch1_g_error;
		}
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->stream);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_object_unref0 (_data_->file);
#line 1323 "midori-hsts.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_inner_error_ = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp18_ = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp18_ = _data_->filename;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp19_ = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp19_ = _data_->_error_;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp20_ = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_data_->_tmp20_ = _data_->_tmp19_->message;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_critical ("midori-hsts.vala:122: Failed to update %s: %s", _data_->_tmp18_, _data_->_tmp20_);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_error_free0 (_data_->_error_);
#line 1348 "midori-hsts.c"
	}
	__finally1:
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_data_->filename);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_clear_error (&_data_->_inner_error_);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return FALSE;
#line 1361 "midori-hsts.c"
	}
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (_data_->filename);
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_data_->_state_ == 0) {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1369 "midori-hsts.c"
	} else {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1373 "midori-hsts.c"
	}
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_object_unref (_data_->_async_result);
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return FALSE;
#line 1379 "midori-hsts.c"
}


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


static void midori_hsts_strict_transport_security_handled (MidoriHSTS* self, SoupMessage* message) {
	gboolean _tmp0_ = FALSE;
	SoupMessage* _tmp1_ = NULL;
	const gchar* hsts = NULL;
	SoupMessage* _tmp5_ = NULL;
	SoupMessageHeaders* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	MidoriHSTSDirective* directive = NULL;
	const gchar* _tmp9_ = NULL;
	MidoriHSTSDirective* _tmp10_ = NULL;
	MidoriHSTSDirective* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp23_ = FALSE;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (self != NULL);
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_if_fail (message != NULL);
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = message;
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp1_ == NULL) {
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp0_ = TRUE;
#line 1433 "midori-hsts.c"
	} else {
		SoupMessage* _tmp2_ = NULL;
		SoupURI* _tmp3_ = NULL;
		SoupURI* _tmp4_ = NULL;
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp2_ = message;
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp3_ = soup_message_get_uri (_tmp2_);
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp4_ = _tmp3_;
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp0_ = _tmp4_ == NULL;
#line 1446 "midori-hsts.c"
	}
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp0_) {
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return;
#line 1452 "midori-hsts.c"
	}
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp5_ = message;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp6_ = _tmp5_->response_headers;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp7_ = soup_message_headers_get_one (_tmp6_, "Strict-Transport-Security");
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	hsts = _tmp7_;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp8_ = hsts;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp8_ == NULL) {
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return;
#line 1468 "midori-hsts.c"
	}
#line 134 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp9_ = hsts;
#line 134 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp10_ = midori_hsts_directive_new_from_header (_tmp9_);
#line 134 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	directive = _tmp10_;
#line 135 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp11_ = directive;
#line 135 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp12_ = midori_hsts_directive_is_valid (_tmp11_);
#line 135 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp12_) {
#line 1482 "midori-hsts.c"
		SoupMessage* _tmp13_ = NULL;
		SoupURI* _tmp14_ = NULL;
		SoupURI* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		MidoriHSTSDirective* _tmp17_ = NULL;
		SoupMessage* _tmp18_ = NULL;
		SoupURI* _tmp19_ = NULL;
		SoupURI* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		const gchar* _tmp22_ = NULL;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp13_ = message;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp14_ = soup_message_get_uri (_tmp13_);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp15_ = _tmp14_;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp16_ = _tmp15_->host;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp17_ = directive;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_append_to_whitelist (self, _tmp16_, _tmp17_);
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp18_ = message;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp19_ = soup_message_get_uri (_tmp18_);
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp20_ = _tmp19_;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp21_ = _tmp20_->host;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp22_ = hsts;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_append_to_cache (self, _tmp21_, _tmp22_, NULL, NULL);
#line 1517 "midori-hsts.c"
	}
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp23_ = self->priv->debug;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp23_) {
#line 1523 "midori-hsts.c"
		FILE* _tmp24_ = NULL;
		SoupMessage* _tmp25_ = NULL;
		SoupURI* _tmp26_ = NULL;
		SoupURI* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		MidoriHSTSDirective* _tmp30_ = NULL;
		gboolean _tmp31_ = FALSE;
		gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp24_ = stdout;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp25_ = message;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp26_ = soup_message_get_uri (_tmp25_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp27_ = _tmp26_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp28_ = _tmp27_->host;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp29_ = hsts;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp30_ = directive;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp31_ = midori_hsts_directive_is_valid (_tmp30_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp32_ = bool_to_string (_tmp31_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp33_ = _tmp32_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		fprintf (_tmp24_, "HSTS: '%s' sets '%s' valid? %s\n", _tmp28_, _tmp29_, _tmp33_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_free0 (_tmp33_);
#line 1558 "midori-hsts.c"
	}
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_midori_hsts_directive_unref0 (directive);
#line 1562 "midori-hsts.c"
}


static void _vala_SoupDate_free (SoupDate* self) {
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_boxed_free (soup_date_get_type (), self);
#line 1569 "midori-hsts.c"
}


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


MidoriHSTSDirective* midori_hsts_directive_new (gboolean include_sub_domains) {
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return midori_hsts_directive_construct (MIDORI_HSTS_TYPE_DIRECTIVE, include_sub_domains);
#line 1598 "midori-hsts.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 1618 "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_ = NULL;
	GHashTable* _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	gchar* max_age = NULL;
	GHashTable* _tmp3_ = NULL;
	gconstpointer _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	GHashTable* _tmp12_ = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_val_if_fail (header != NULL, NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = (MidoriHSTSDirective*) g_type_create_instance (object_type);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp0_ = header;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = soup_header_parse_param_list (_tmp0_);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	param_list = _tmp1_;
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp2_ = param_list;
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp2_ == NULL) {
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_g_hash_table_unref0 (param_list);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return self;
#line 1654 "midori-hsts.c"
	}
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp3_ = param_list;
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp4_ = g_hash_table_lookup (_tmp3_, "max-age");
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp5_ = g_strdup ((const gchar*) _tmp4_);
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	max_age = _tmp5_;
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp6_ = max_age;
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp6_ != NULL) {
#line 1668 "midori-hsts.c"
		const gchar* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		SoupDate* _tmp9_ = NULL;
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp7_ = max_age;
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp8_ = atoi (_tmp7_);
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp9_ = soup_date_new_from_now (_tmp8_);
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		__vala_SoupDate_free0 (self->expires);
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		self->expires = _tmp9_;
#line 1682 "midori-hsts.c"
	}
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp10_ = header;
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp11_ = string_contains (_tmp10_, "includeSubDomains");
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp11_) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		self->sub_domains = TRUE;
#line 1692 "midori-hsts.c"
	}
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp12_ = param_list;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	soup_header_free_param_list (_tmp12_);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_free0 (max_age);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_hash_table_unref0 (param_list);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return self;
#line 1704 "midori-hsts.c"
}


MidoriHSTSDirective* midori_hsts_directive_new_from_header (const gchar* header) {
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return midori_hsts_directive_construct_from_header (MIDORI_HSTS_TYPE_DIRECTIVE, header);
#line 1711 "midori-hsts.c"
}


gboolean midori_hsts_directive_is_valid (MidoriHSTSDirective* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	SoupDate* _tmp1_ = NULL;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_tmp1_ = self->expires;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (_tmp1_ != NULL) {
#line 1725 "midori-hsts.c"
		SoupDate* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp2_ = self->expires;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp3_ = soup_date_is_past (_tmp2_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp0_ = !_tmp3_;
#line 1734 "midori-hsts.c"
	} else {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		_tmp0_ = FALSE;
#line 1738 "midori-hsts.c"
	}
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	result = _tmp0_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return result;
#line 1744 "midori-hsts.c"
}


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


static void midori_hsts_value_directive_free_value (GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_directive_unref (value->data[0].v_pointer);
#line 1760 "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.10-1.i686/src/katze/midori-hsts.vala"
	if (src_value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		dest_value->data[0].v_pointer = midori_hsts_directive_ref (src_value->data[0].v_pointer);
#line 1770 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1774 "midori-hsts.c"
	}
}


static gpointer midori_hsts_value_directive_peek_pointer (const GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return value->data[0].v_pointer;
#line 1782 "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.10-1.i686/src/katze/midori-hsts.vala"
	if (collect_values[0].v_pointer) {
#line 1789 "midori-hsts.c"
		MidoriHSTSDirective* object;
		object = collect_values[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		if (object->parent_instance.g_class == NULL) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1796 "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.10-1.i686/src/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 1800 "midori-hsts.c"
		}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = midori_hsts_directive_ref (object);
#line 1804 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1808 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return NULL;
#line 1812 "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.10-1.i686/src/katze/midori-hsts.vala"
	if (!object_p) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1823 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (!value->data[0].v_pointer) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		*object_p = NULL;
#line 1829 "midori-hsts.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		*object_p = value->data[0].v_pointer;
#line 1833 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		*object_p = midori_hsts_directive_ref (value->data[0].v_pointer);
#line 1837 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return NULL;
#line 1841 "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.10-1.i686/src/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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return G_PARAM_SPEC (spec);
#line 1855 "midori-hsts.c"
}


gpointer midori_hsts_value_get_directive (const GValue* value) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	return value->data[0].v_pointer;
#line 1864 "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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	old = value->data[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (v_object) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = v_object;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_directive_ref (value->data[0].v_pointer);
#line 1884 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1888 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (old) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_directive_unref (old);
#line 1894 "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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	old = value->data[0].v_pointer;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (v_object) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = v_object;
#line 1913 "midori-hsts.c"
	} else {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		value->data[0].v_pointer = NULL;
#line 1917 "midori-hsts.c"
	}
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	if (old) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
		midori_hsts_directive_unref (old);
#line 1923 "midori-hsts.c"
	}
}


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


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


static void midori_hsts_directive_finalize (MidoriHSTSDirective* obj) {
	MidoriHSTSDirective * self;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	g_signal_handlers_destroy (self);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	__vala_SoupDate_free0 (self->expires);
#line 1956 "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.10-1.i686/src/katze/midori-hsts.vala"
	g_atomic_int_inc (&self->ref_count);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	return instance;
#line 1981 "midori-hsts.c"
}


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


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


static void midori_hsts_soup_session_feature_interface_init (SoupSessionFeatureInterface * iface) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	iface->add_feature = (gboolean (*)(SoupSessionFeature*, GType)) midori_hsts_real_add_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	iface->remove_feature = (gboolean (*)(SoupSessionFeature*, GType)) midori_hsts_real_remove_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	iface->has_feature = (gboolean (*)(SoupSessionFeature*, GType)) midori_hsts_real_has_feature;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	iface->attach = (void (*)(SoupSessionFeature*, SoupSession*)) midori_hsts_real_attach;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	iface->detach = (void (*)(SoupSessionFeature*, SoupSession*)) midori_hsts_real_detach;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/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.10-1.i686/src/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.10-1.i686/src/katze/midori-hsts.vala"
	iface->request_unqueued = (void (*)(SoupSessionFeature*, SoupSession*, SoupMessage*)) midori_hsts_real_request_unqueued;
#line 2029 "midori-hsts.c"
}


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


static void midori_hsts_finalize (GObject* obj) {
	MidoriHSTS * self;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_HSTS, MidoriHSTS);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	_g_hash_table_unref0 (self->priv->whitelist);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/katze/midori-hsts.vala"
	G_OBJECT_CLASS (midori_hsts_parent_class)->finalize (obj);
#line 2050 "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;
}



