mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Minor fixes for logging response codes correctly (hopefully)
svn path=/trunk/icecast/; revision=3840
This commit is contained in:
parent
25f0c9f4bb
commit
f8250d8df0
@ -52,6 +52,7 @@ void client_send_404(client_t *client, char *message) {
|
|||||||
"Content-Type: text/html\r\n\r\n"
|
"Content-Type: text/html\r\n\r\n"
|
||||||
"<b>%s</b>\r\n", message);
|
"<b>%s</b>\r\n", message);
|
||||||
if(bytes > 0) client->con->sent_bytes = bytes;
|
if(bytes > 0) client->con->sent_bytes = bytes;
|
||||||
|
client->respcode = 404;
|
||||||
client_destroy(client);
|
client_destroy(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,5 +63,6 @@ void client_send_401(client_t *client) {
|
|||||||
"\r\n"
|
"\r\n"
|
||||||
"You need to authenticate\r\n");
|
"You need to authenticate\r\n");
|
||||||
if(bytes > 0) client->con->sent_bytes = bytes;
|
if(bytes > 0) client->con->sent_bytes = bytes;
|
||||||
|
client->respcode = 401;
|
||||||
client_destroy(client);
|
client_destroy(client);
|
||||||
}
|
}
|
||||||
|
@ -319,6 +319,7 @@ int connection_create_source(client_t *client, connection_t *con, http_parser_t
|
|||||||
WARN0("No content-type header, cannot handle source");
|
WARN0("No content-type header, cannot handle source");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
client->respcode = 200;
|
||||||
bytes = sock_write(client->con->sock,
|
bytes = sock_write(client->con->sock,
|
||||||
"HTTP/1.0 200 OK\r\n\r\n");
|
"HTTP/1.0 200 OK\r\n\r\n");
|
||||||
if(bytes > 0) client->con->sent_bytes = bytes;
|
if(bytes > 0) client->con->sent_bytes = bytes;
|
||||||
@ -506,6 +507,7 @@ static void _handle_get_request(connection_t *con,
|
|||||||
/* If the file exists, then transform it, otherwise, write a 404 */
|
/* If the file exists, then transform it, otherwise, write a 404 */
|
||||||
if (stat(fullpath, &statbuf) == 0) {
|
if (stat(fullpath, &statbuf) == 0) {
|
||||||
DEBUG0("Stats request, sending XSL transformed stats");
|
DEBUG0("Stats request, sending XSL transformed stats");
|
||||||
|
client->respcode = 200;
|
||||||
bytes = sock_write(client->con->sock,
|
bytes = sock_write(client->con->sock,
|
||||||
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n");
|
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n");
|
||||||
if(bytes > 0) client->con->sent_bytes = bytes;
|
if(bytes > 0) client->con->sent_bytes = bytes;
|
||||||
|
Loading…
Reference in New Issue
Block a user