[rtmpdump] [PATCH] Better URL decoding support
Howard Chu
hyc at highlandsun.com
Thu Oct 25 13:00:55 CEST 2012
Steven Penny wrote:
> 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
No. These are not the same situation.
> 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