diff options
author | Christian Hesse <mail@eworm.de> | 2014-04-22 13:59:22 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-04-22 13:59:22 +0200 |
commit | 5ab1307daf649f8637420d6ce008d38e036544b7 (patch) | |
tree | eea8c0ef4f449ecd778cc7a6d87e0c7ab8c1312b /pacredir.c | |
parent | 1c9cc347b096b2536b229ef0e0d1551090e8ed70 (diff) | |
download | pacredir-5ab1307daf649f8637420d6ce008d38e036544b7.tar.gz pacredir-5ab1307daf649f8637420d6ce008d38e036544b7.tar.zst |
fix filename in html pages
Diffstat (limited to 'pacredir.c')
-rw-r--r-- | pacredir.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |