commit a4ea7cbe676adffd1dbd98b2bb7f68591b24d46c
parent 87ae2e9212c5cc7309eefa2a3f49a758862db6c7
Author: Laslo Hunhold <dev@frign.de>
Date: Sun, 24 Jan 2021 21:14:13 +0100
Revert "Fix directory-index-handling"
This reverts commit 87ae2e9212c5cc7309eefa2a3f49a758862db6c7, which
did three things at once and lacked proper git-author-attribution for
Quentin for the underlying change.
I have read too many OpenBSD-CVS-logs where this is common, but only
due to the fact that CSV doesn't distinguish between author and
committer, which leads to an antipattern in git.
Diffstat:
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/http.c b/http.c
@@ -760,13 +760,6 @@ http_prepare_response(const struct request *req, struct response *res,
S_FORBIDDEN : S_NOT_FOUND;
goto err;
}
- } else {
- /* docindex is valid, write tmpuri to response-path */
- if (esnprintf(res->path, sizeof(res->path), "%s",
- tmpuri)) {
- s = S_REQUEST_TOO_LARGE;
- goto err;
- }
}
}
@@ -807,7 +800,7 @@ http_prepare_response(const struct request *req, struct response *res,
/* mime */
mime = "application/octet-stream";
- if ((p = strrchr(res->path, '.'))) {
+ if ((p = strrchr(realuri, '.'))) {
for (i = 0; i < LEN(mimes); i++) {
if (!strcmp(mimes[i].ext, p + 1)) {
mime = mimes[i].type;