Commit 76ff92cb authored by Michael Smith's avatar Michael Smith
Browse files

_handle_connection() cleanup, major restructuring. No feature changes.

svn path=/trunk/icecast/; revision=3807
parent 6e23c0f8
......@@ -44,3 +44,14 @@ void client_destroy(client_t *client)
void client_send_404(client_t *client, char *message) {
int bytes;
bytes = sock_write(client->con->sock, "HTTP/1.0 404 File Not Found\r\n"
"Content-Type: text/html\r\n\r\n"
"<b>%s</b>\r\n", message);
if(bytes > 0) client->con->sent_bytes = bytes;
......@@ -24,5 +24,6 @@ typedef struct _client_tag
client_t *client_create(connection_t *con, http_parser_t *parser);
void client_destroy(client_t *client);
void client_send_404(client_t *client, char *message);
#endif /* __CLIENT_H__ */
This diff is collapsed.
......@@ -206,9 +206,6 @@ char *util_get_path_from_normalised_uri(char *uri) {
return fullpath;
/* Get an absolute path (from the webroot dir) from a URI. Return NULL if the
* path contains 'disallowed' sequences like foo/../ (which could be used to
* escape from the webroot) or if it cannot be URI-decoded.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment