[rtmpdump] [PATCH] Content Length check should be case insensitive
dburr at topcon.com
Thu Aug 12 07:18:53 CEST 2010
I have found a minor problem in rtmpdump which took me quite a while to
In HTTP_read() the following check is done to make sure that the header
contains a content length field:
ptr = strstr(r->m_sb.sb_start, "Content-Length:");
Not every HTTP server and proxy uses this exact capitalisation. In my
case the response header is:
HTTP/1.1 200 OK
Date: Thu, 12 Aug 2010 03:21:05 GMT
Via: 1.1 proxy1
The call to strstr() will not match in this case. It could be be easily
fixed by replacing strstr() with strcasestr() but this is a GNU
extension. To make a portable solution it is necessary to iterate and
call strncasecmp() like in the attached patch.
Confidentiality Notice: This message (including attachments) is a private communication solely for use of the intended recipient(s).
If you are not the intended recipient(s) or believe you received this message in error, notify the sender immediately and then delete this
message. Any other use, retention, dissemination or copying is prohibited and may be a violation of law, including the Electronic
Communication Privacy Act of 1986."
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1023 bytes
Desc: not available
More information about the rtmpdump