diff options
Diffstat (limited to 'response.c')
-rw-r--r-- | response.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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", |