diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 20:26:03 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 20:41:45 +0400 |
commit | 1d19f1b196c70cf2bd17d486e833bfa257314ef0 (patch) | |
tree | 5b62c8269aa4dd106cc7da4094541a7cb7d04c76 /libavformat/http.c | |
parent | 45ab71a8b86e2dd72654399419c1b2d0ac09c3a5 (diff) | |
parent | 393d80cc278e2b2f5c9e7805db176e6f28335a33 (diff) |
Merge commit '393d80cc278e2b2f5c9e7805db176e6f28335a33'
* commit '393d80cc278e2b2f5c9e7805db176e6f28335a33':
http: Support relative URL redirection
Conflicts:
libavformat/http.c
See: 4a4c93cb3f2f564263f4b20446a7d500772e0d40
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 53e7b1ba0f..c05cf4eeaf 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -317,7 +317,6 @@ static int process_line(URLContext *h, char *line, int line_count, { HTTPContext *s = h->priv_data; char *tag, *p, *end; - char redirected_location[MAX_URL_SIZE]; /* end of header */ if (line[0] == '\0') { @@ -357,7 +356,9 @@ static int process_line(URLContext *h, char *line, int line_count, while (av_isspace(*p)) p++; if (!av_strcasecmp(tag, "Location")) { - ff_make_absolute_url(redirected_location, sizeof(redirected_location), s->location, p); + char redirected_location[MAX_URL_SIZE]; + ff_make_absolute_url(redirected_location, sizeof(redirected_location), + s->location, p); av_strlcpy(s->location, redirected_location, sizeof(s->location)); *new_location = 1; } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) { |