summaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-04-22 13:59:22 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-04-22 13:59:22 +0200
commit5ab1307daf649f8637420d6ce008d38e036544b7 (patch)
treeeea8c0ef4f449ecd778cc7a6d87e0c7ab8c1312b /pacredir.c
parent1c9cc347b096b2536b229ef0e0d1551090e8ed70 (diff)
downloadpacredir-5ab1307daf649f8637420d6ce008d38e036544b7.tar.gz
pacredir-5ab1307daf649f8637420d6ce008d38e036544b7.tar.zst
fix filename in html pages
Diffstat (limited to 'pacredir.c')
-rw-r--r--pacredir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pacredir.c b/pacredir.c
index 7c156c4..50b72c8 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -430,7 +430,7 @@ response:
if (http_code == MHD_HTTP_OK) {
write_log(stdout, "Redirecting to %s\n", url);
page = malloc(strlen(PAGE307) + strlen(url) + strlen(basename) + 1);
- sprintf(page, PAGE307, url, basename + 1);
+ sprintf(page, PAGE307, url, basename);
response = MHD_create_response_from_data(strlen(page), (void*) page, MHD_NO, MHD_NO);
ret = MHD_add_response_header(response, "Location", url);
ret = MHD_queue_response(connection, MHD_HTTP_TEMPORARY_REDIRECT, response);
@@ -443,7 +443,7 @@ response:
else
write_log(stdout, "File %s not found on %d servers, giving up.\n", basename, req_count + 1);
page = malloc(strlen(PAGE404) + strlen(basename) + 1);
- sprintf(page, PAGE404, basename + 1);
+ sprintf(page, PAGE404, basename);
response = MHD_create_response_from_data(strlen(page), (void*) page, MHD_NO, MHD_NO);
ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response);
}