From cec036150339e076214fcbc1ea07d0a20f3a9546 Mon Sep 17 00:00:00 2001 From: oddsock Date: Tue, 7 Dec 2004 22:42:50 +0000 Subject: [PATCH] removal of old and unused code add '+' to those fields that are url decoded. svn path=/icecast/trunk/httpp/; revision=8346 --- httpp/httpp.c | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/httpp/httpp.c b/httpp/httpp.c index 01b8bf2..fd1a47c 100644 --- a/httpp/httpp.c +++ b/httpp/httpp.c @@ -228,6 +228,9 @@ static char *url_escape(char *src) *dst++ = hex(src[i+1]) * 16 + hex(src[i+2]); i+= 2; break; + case '+': + *dst++ = ' '; + break; case '#': done = 1; break; @@ -282,43 +285,6 @@ static void parse_query(http_parser_t *parser, char *query) } } -/* 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;