1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

removal of old and unused code

add '+' to those fields that are url decoded.

svn path=/icecast/trunk/httpp/; revision=8346
This commit is contained in:
oddsock 2004-12-07 22:42:50 +00:00
parent b3d5a657d2
commit f09ae872d6

View File

@ -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;