aboutsummaryrefslogtreecommitdiffstats
path: root/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'response.c')
-rw-r--r--response.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/response.c b/response.c
index 8c61a9b..7599985 100644
--- a/response.c
+++ b/response.c
@@ -209,6 +209,8 @@ mkerror(struct REQUEST *req, int status, int ka)
void
mkredirect(struct REQUEST *req)
{
+ char buf[MAX_PATH];
+
req->status = 302;
req->body = req->path;
req->lbody = strlen(req->body);
@@ -219,7 +221,8 @@ mkredirect(struct REQUEST *req)
"Content-Length: %" PRId64 "\r\n",
"302 Redirect",server_name,
req->keep_alive ? "Keep-Alive" : "Close",
- req->hostname,tcp_port,quote(req->path,9999),
+ req->hostname, tcp_port,
+ quote(req->path,9999,buf,sizeof(buf)),
(int64_t)req->lbody);
req->lres += strftime(req->hres+req->lres,80,
"Date: " RFC1123 "\r\n\r\n",