[rtmpdump] [PATCH] Better URL decoding support
Steven Penny
svnpenn at gmail.com
Thu Oct 25 07:47:49 CEST 2012
On Thu, Oct 25, 2012 at 12:35 AM, NhJm wrote:
> It does do urldecoding. It would probably be best to remove it.
If we remove it from parseurl.c, then are we going to remove it from rtmpgw.c
if (strncmp(data + src_x, "%", 1) == 0 && src_x + 2 < length)
{
//
// Since we encountered a '%' we know this is an escaped character
//
hex[0] = data[src_x + 1];
hex[1] = data[src_x + 2];
data[dst_x] = (char) strtol(hex, &stp, 16);
dst_x += 1;
src_x += 3;
}
and rtmp.c
if (*p1 == '\\') {
unsigned int c;
if (port < 3)
return FALSE;
sscanf(p1+1, "%02x", &c);
*p2++ = c;
port -= 3;
p1 += 3;
}
More information about the rtmpdump
mailing list