Introduction
Introduction Statistics Contact Development Disclaimer Help
http: fix default index serving - quark - quark web server
git clone git://git.suckless.org/quark
Log
Files
Refs
LICENSE
---
commit deeec27c56d8f5049abac0dad3782f5daf95a1a3
parent a4ea7cbe676adffd1dbd98b2bb7f68591b24d46c
Author: Quentin Rameau <[email protected]>
Date: Fri, 17 Jan 2020 14:41:55 +0100
http: fix default index serving
The previous code would find and stat the default index file,
but would not append it to the file served, resulting in
giving back a 0-length content but with a Content-Length
header of the size of the index.
Diffstat:
M http.c | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/http.c b/http.c
@@ -761,6 +761,11 @@ http_prepare_response(const struct request *req, struct re…
goto err;
}
}
+ /* copy the found index back to the final path */
+ if (esnprintf(res->path, sizeof(res->path), "%s", tmpuri)) {
+ s = S_REQUEST_TOO_LARGE;
+ goto err;
+ }
}
/* modified since */
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.