mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Fix/Cleanup: Answer SOURCE/PUT requests with a real 200-OK.
We have answered SOURCE/PUT requests with a simple "HTTP/1.0 200 OK\r\n\r\n" while we should answer with complet headers. This commit corrects this. Interoperability: This will work for two classes of clients: * Super dumb ones not checking the response and will just send data and hope the socket is still open. * Those with a real parser. * Shoutcast clients (indepnded code path). * All libshout, curl, wget, ... based clients. This *could* break: * Clients that check for the exact returned message. However as we start with the same string this should work. Only client that check for the string including the End-of-header CRLF sequense may break. Please test careful before release.
This commit is contained in:
parent
9cf6d9313c
commit
d6908eb024
@ -882,8 +882,7 @@ static inline void source_startup(client_t *client, const char *uri)
|
||||
} else {
|
||||
refbuf_t *ok = refbuf_new(PER_CLIENT_REFBUF_SIZE);
|
||||
client->respcode = 200;
|
||||
snprintf(ok->data, PER_CLIENT_REFBUF_SIZE,
|
||||
"HTTP/1.0 200 OK\r\n\r\n");
|
||||
util_http_build_header(ok->data, PER_CLIENT_REFBUF_SIZE, 0, 0, 200, NULL, NULL, NULL, "", NULL, client);
|
||||
ok->len = strlen(ok->data);
|
||||
/* we may have unprocessed data read in, so don't overwrite it */
|
||||
ok->associated = client->refbuf;
|
||||
|
Loading…
Reference in New Issue
Block a user