From b7f77865698226a290357d92324c5b4394c3e511 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 30 Jan 2016 11:22:19 +0100 Subject: [PATCH] _zak_cgi_main_get_env returns GValue. --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index efa6046..6ac4d7d 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Andrea Zagli + * Copyright (C) 2015-2016 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1134,13 +1134,13 @@ zak_cgi_main_redirect (ZakCgiMain *zakcgimain, const gchar *url) { ht_env = _zak_cgi_main_get_env (zakcgimain); - value = (gchar *)g_hash_table_lookup (ht_env, "REQUEST_SCHEME"); + value = (gchar *)g_value_get_string ((GValue *)g_hash_table_lookup (ht_env, "REQUEST_SCHEME")); if (value != NULL) { g_string_append_printf (_url, "%s://", value); } - value = (gchar *)g_hash_table_lookup (ht_env, "SERVER_NAME"); + value = (gchar *)g_value_get_string ((GValue *)g_hash_table_lookup (ht_env, "SERVER_NAME")); if (value != NULL) { if (!g_str_has_prefix (url, value)) @@ -1153,7 +1153,7 @@ zak_cgi_main_redirect (ZakCgiMain *zakcgimain, const gchar *url) { /* TODO * test if it starts with a domain, ex: www.google.it */ - value = (gchar *)g_hash_table_lookup (ht_env, "CONTEXT_PREFIX"); + value = (gchar *)g_value_get_string ((GValue *)g_hash_table_lookup (ht_env, "CONTEXT_PREFIX")); if (value != NULL) { if (!g_str_has_prefix (url, value)) -- 2.49.0