[rtmpdump] r405 - in trunk: librtmp/Makefile librtmp/handshake.h librtmp/rtmp.c librtmp/rtmp.h rtmpdump.c rtmpgw.c rtmpsuck.c

NhJm nhjm449 at gmail.com
Sun Mar 28 10:25:15 CEST 2010


On Sun, Mar 28, 2010 at 2:52 AM, Howard Chu <hyc at highlandsun.com> wrote:
> Howard Chu wrote:
>>
>> NhJm wrote:
>>>
>>> How exactly would one quote a value? What if a value contains spaces?
>>> ie. flashVer, a connect string, or an output filename? (Not counting
>>> URLs which can be encoded, although URLs with unencoded spaces may
>>> theorhetically be required by a server.)
>>
>> The output filename is not handled by these changes. I'm only talking
>> about
>> options that directly affect the RTMP negotiation, since they will be
>> needed
>> universally. (E.g., in XBMC, mplayer, or any other app that wants to
>> access an
>> RTMP stream, independent of what they do with the stream once they connect
>> to it.)
>>
>> Servers cannot require unencoded spaces. Unencoded spaces are illegal in
>> URLs.
>> So, for spaces in values, just URLencode them, e.g.
>> flashVer=LNX%2010.0.3.22
>
> URL encoding here would be a big mistake. We'll have to use some other
> escaping or substitution instead. Any method will work as long as it doesn't
> duplicate URL encoding.
>
> How about: replace spaces with TAB+Ctrl-A, (0x08 0x01) and replace TABs with
> TAB+Ctrl-B (0x08 0x02). Simple and probably low impact.

But a user wouldn't be able to easily enter these charcters.
Backslashes would be a common and expected solution, requiring less
explanation.


More information about the rtmpdump mailing list