[FFmpeg-trac] #9065(avformat:closed): avformat_open_input doesn't handle HTTP status code 308
FFmpeg
trac at avcodec.org
Sat Jan 30 01:48:32 EET 2021
#9065: avformat_open_input doesn't handle HTTP status code 308
-------------------------------------+------------------------------------
Reporter: rbcbw | Owner:
Type: defect | Status: closed
Priority: normal | Component: avformat
Version: unspecified | Resolution: fixed
Keywords: http | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+------------------------------------
Changes (by cehoyos):
* keywords: => http
Old description:
> Summary of the bug:
>
> When using avformat_open_input to stream an mp3 such as a podcast, it
> does not handle a 308 Permanent Redirect HTTP status code.
> This has been more recently defined in
> https://tools.ietf.org/html/rfc7538
>
> This can (currently) be seen with, for example,
> http://www.podtrac.com/pts/redirect.mp3/pdst.fm/e/chtbl.com/track/5899E/traffic.megaphone.fm/HSW1892445597.mp3
>
> I did submit a patch for this to the FFmpeg-devel list - which I don't
> think has been picked up: http://ffmpeg.org/pipermail/ffmpeg-
> devel/2021-January/274625.html
>
> The patch is:
> ---
> libavformat/http.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/http.c b/libavformat/http.c
> index 6c39da1a8b..6d995877d2 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -292,7 +292,7 @@ redo:
> goto fail;
> }
> if ((s->http_code == 301 || s->http_code == 302 ||
> - s->http_code == 303 || s->http_code == 307) &&
> + s->http_code == 303 || s->http_code == 307 || s->http_code ==
> 308) &&
> location_changed == 1) {
> /* url moved, get next */
> ffurl_closep(&s->hd);
> --
New description:
Summary of the bug:
When using avformat_open_input to stream an mp3 such as a podcast, it does
not handle a 308 Permanent Redirect HTTP status code.
This has been more recently defined in https://tools.ietf.org/html/rfc7538
This can (currently) be seen with, for example,
http://www.podtrac.com/pts/redirect.mp3/pdst.fm/e/chtbl.com/track/5899E/traffic.megaphone.fm/HSW1892445597.mp3
I did submit a patch for this to the FFmpeg-devel list - which I don't
think has been picked up: http://ffmpeg.org/pipermail/ffmpeg-
devel/2021-January/274625.html
The patch is:
{{{
libavformat/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 6c39da1a8b..6d995877d2 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -292,7 +292,7 @@ redo:
goto fail;
}
if ((s->http_code == 301 || s->http_code == 302 ||
- s->http_code == 303 || s->http_code == 307) &&
+ s->http_code == 303 || s->http_code == 307 || s->http_code ==
308) &&
location_changed == 1) {
/* url moved, get next */
ffurl_closep(&s->hd);
}}}
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9065#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list