[xiph-commits] r8346 - icecast/trunk/httpp

oddsock at motherfish-iii.xiph.org oddsock at motherfish-iii.xiph.org
Tue Dec 7 14:42:50 PST 2004


Author: oddsock
Date: 2004-12-07 14:42:50 -0800 (Tue, 07 Dec 2004)
New Revision: 8346

Modified:
   icecast/trunk/httpp/httpp.c
Log:
removal of old and unused code
add '+' to those fields that are url decoded.


Modified: icecast/trunk/httpp/httpp.c
===================================================================
--- icecast/trunk/httpp/httpp.c	2004-12-07 22:29:46 UTC (rev 8345)
+++ icecast/trunk/httpp/httpp.c	2004-12-07 22:42:50 UTC (rev 8346)
@@ -228,6 +228,9 @@
             *dst++ = hex(src[i+1]) * 16  + hex(src[i+2]);
             i+= 2;
             break;
+        case '+':
+            *dst++ = ' ';
+            break;
         case '#':
             done = 1;
             break;
@@ -282,43 +285,6 @@
     }
 }
 
-/* The old shoutcast procotol. Don't look at this, it's really nasty */
-int httpp_parse_icy(http_parser_t *parser, char *http_data, unsigned long len)
-{
-    char *data;
-    char *line[MAX_HEADERS];
-    int lines;
-
-    if(http_data == NULL)
-        return 0;
-
-    data = malloc(len + 1);
-    memcpy(data, http_data, len);
-    data[len] = 0;
-
-    lines = split_headers(data, len, line);
-
-    /* Now, this protocol looks like:
-     * sourcepassword\n
-     * headers: as normal\n"
-     * \n
-     */
-
-    parser->req_type = httpp_req_source;
-    httpp_setvar(parser, HTTPP_VAR_URI, "/");
-    httpp_setvar(parser, HTTPP_VAR_ICYPASSWORD, line[0]);
-    httpp_setvar(parser, HTTPP_VAR_PROTOCOL, "ICY");
-    httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "SOURCE");
-    /* This protocol is evil */
-    httpp_setvar(parser, HTTPP_VAR_VERSION, "666");
-
-    parse_headers(parser, line, lines);
-
-    free(data);
-    
-    return 1;
-}
-
 int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len)
 {
     char *data, *tmp;



More information about the commits mailing list