Merge commit '393d80cc278e2b2f5c9e7805db176e6f28335a33'

* commit '393d80cc278e2b2f5c9e7805db176e6f28335a33':
  http: Support relative URL redirection

Conflicts:
	libavformat/http.c

See: 4a4c93cb3f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-22 17:26:03 +01:00
commit 1d19f1b196
1 changed files with 3 additions and 2 deletions

View File

@ -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) {