improve test error messages

This commit is contained in:
Arvid Norberg 2011-11-25 22:50:43 +00:00
parent ce90e17e2b
commit 12d94246df
1 changed files with 2 additions and 0 deletions

View File

@ -1066,6 +1066,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
int res = load_file(path, file_buf, ec);
if (res == -1)
{
fprintf(stderr, ">> file not found: %s\n", path.c_str());
send_response(s, ec, 404, "Not Found", extra_header, 0);
continue;
}
@ -1073,6 +1074,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
if (res != 0)
{
// this means the file was either too big or couldn't be read
fprintf(stderr, ">> file too big: %s\n", path.c_str());
send_response(s, ec, 503, "Internal Error", extra_header, 0);
continue;
}