Commit 8e675995 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '5ae17853'

* commit '5ae17853':
  http: Add the trailing endlines if they are missing
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents 77d8fd5c 5ae17853
...@@ -368,9 +368,16 @@ static int http_open(URLContext *h, const char *uri, int flags, ...@@ -368,9 +368,16 @@ static int http_open(URLContext *h, const char *uri, int flags,
if (s->headers) { if (s->headers) {
int len = strlen(s->headers); int len = strlen(s->headers);
if (len < 2 || strcmp("\r\n", s->headers + len - 2)) if (len < 2 || strcmp("\r\n", s->headers + len - 2)) {
av_log(h, AV_LOG_WARNING, av_log(h, AV_LOG_WARNING,
"No trailing CRLF found in HTTP header.\n"); "No trailing CRLF found in HTTP header.\n");
ret = av_reallocp(&s->headers, len + 3);
if (ret < 0)
return ret;
s->headers[len] = '\r';
s->headers[len + 1] = '\n';
s->headers[len + 2] = '\0';
}
} }
if (s->listen) { if (s->listen) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment