[icecast-dev] minor error in http response

wayne zhao titita_zhao at hotmail.com
Mon Apr 19 05:57:46 PDT 2004



   there is a "copy/paste" error in src/client.c, line 55 (v 2.0.0). it also exists in cvs.

   in client_send_400, it should return http code 400, not 404.

   i love this project and like to participate. 

   
--- client.c.orig       2004-04-19 17:35:26.000000000 +0800
+++ client.c    2004-04-19 17:36:37.000000000 +0800
@@ -54,11 +54,11 @@

 void client_send_400(client_t *client, char *message) {
     int bytes;
-    bytes = sock_write(client->con->sock, "HTTP/1.0 404 File Not Found\r\n"
+    bytes = sock_write(client->con->sock, "HTTP/1.0 400 Bad Request\r\n"
             "Content-Type: text/html\r\n\r\n"
             "<b>s</b>\r\n", message);
     if(bytes > 0) client->con->sent_bytes = bytes;
-    client->respcode = 404;
+    client->respcode = 400;
     client_destroy(client);
 }

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list