OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf0cef5
)
http: Add the trailing endlines if they are missing
author
Luca Barbato
<lu_zero@gentoo.org>
Thu, 23 Jul 2015 19:14:09 +0000
(21:14 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Thu, 30 Jul 2015 09:21:26 +0000
(11:21 +0200)
Makes slightly easier the life of those want to use the option
from the command line
libavformat/http.c
patch
|
blob
|
history
diff --git
a/libavformat/http.c
b/libavformat/http.c
index
3b9aa2d
..
b3e9771
100644
(file)
--- a/
libavformat/http.c
+++ b/
libavformat/http.c
@@
-287,9
+287,16
@@
static int http_open(URLContext *h, const char *uri, int flags,
if (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,
"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';
+ }
}
ret = http_open_cnx(h, options);