aboutsummaryrefslogtreecommitdiff
path: root/httpd/server_http.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2015-06-23 19:41:33 +0200
committerReyk Floeter <reyk@esdenera.com>2015-06-23 19:41:33 +0200
commit429408fc074117ba9222fe949b426f196a722e4a (patch)
treec1f4e4b8e1fd6716dcaa90ca378d82f1e4dacd75 /httpd/server_http.c
parent81406d22e54b5d3ad4799d92125dd1c4a4bc0a28 (diff)
downloadhttpd-429408fc074117ba9222fe949b426f196a722e4a.tar.gz
httpd-429408fc074117ba9222fe949b426f196a722e4a.zip
sync with -current
Diffstat (limited to 'httpd/server_http.c')
-rw-r--r--httpd/server_http.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/httpd/server_http.c b/httpd/server_http.c
index bd686e2..112bb00 100644
--- a/httpd/server_http.c
+++ b/httpd/server_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_http.c,v 1.82 2015/06/22 11:46:06 reyk Exp $ */
+/* $OpenBSD: server_http.c,v 1.84 2015/06/23 17:25:01 semarie Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -911,8 +911,11 @@ server_expand_http(struct client *clt, const char *val, char *buf,
return (NULL);
/* Expand variable with matched value */
- if (expand_string(buf, len, ibuf,
- clt->clt_srv_match.sm_match[n]) != 0)
+ if ((str = url_encode(clt->clt_srv_match.sm_match[n])) == NULL)
+ return (NULL);
+ ret = expand_string(buf, len, ibuf, str);
+ free(str);
+ if (ret != 0)
return (NULL);
}
if (strstr(val, "$DOCUMENT_URI") != NULL) {