Browse Source

Merge commit '393d80cc278e2b2f5c9e7805db176e6f28335a33'

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

Conflicts:
	libavformat/http.c

See: 4a4c93cb3f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
1d19f1b196
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/http.c

+ 3
- 2
libavformat/http.c 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) {


Loading…
Cancel
Save