aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}