summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-08-16 02:26:51 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-08-16 02:26:51 +0200
commitaf2dad91e142d074d29863d4786d8afdd47965cd (patch)
treed1a3f29c967e79cb9b09848f1cbaf8a1b98d0233 /httpd.c
parent1a79de743029449f0728021157b324d8a14bef64 (diff)
Unescape paths.
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 49b6b1e..44f7109 100644
--- a/httpd.c
+++ b/httpd.c
@@ -53,7 +53,9 @@ static gboolean service_incoming(GSocketService *service,
* firstline to \0 (HTTP version) */
firstline[g_strv_length(firstline)-1] = '\0';
/* now join from the second string to get the request path */
- gchar *path = g_strjoinv(" ", firstline + 1);
+ gchar *path_escaped = g_strjoinv(" ", firstline + 1);
+ gchar *path = g_uri_unescape_string(path_escaped, NULL);
+ g_free(path_escaped);
g_strfreev(firstline);