aboutsummaryrefslogtreecommitdiffstats
path: root/response.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2007-05-23 09:19:54 +0000
committerkraxel <kraxel>2007-05-23 09:19:54 +0000
commit9b5a6a354b8e9dded8fe0f3de187ff8c70b59047 (patch)
treec04d01335c5e63295a35909424cdd27eb8fdefa8 /response.c
parent01d24a69854ea050353d56c239b4a7df01d2b135 (diff)
downloadwebfs-9b5a6a354b8e9dded8fe0f3de187ff8c70b59047.tar.gz
ls.c fixes
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",