diff options
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index a26ec2aea9..eb08dfe892 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -335,7 +335,10 @@ static int process_line(URLContext *h, char *line, int line_count, while (av_isspace(*p)) p++; if (!av_strcasecmp(tag, "Location")) { - av_strlcpy(s->location, p, sizeof(s->location)); + 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) { s->filesize = strtoll(p, NULL, 10); |