[vlc-devel] [PATCH] access/http: log redirect destination and handle 308
Namit Chugh
nchugh1208 at gmail.com
Sat Apr 11 20:52:31 UTC 2026
modules/access/http.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index XXXXXXX..XXXXXXX 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -322,8 +322,11 @@ connect:
- if( ( p_sys->i_code == 301 || p_sys->i_code == 302 ||
- p_sys->i_code == 303 || p_sys->i_code == 307 ) &&
+ if( ( p_sys->i_code == 301 || p_sys->i_code == 302 ||
+ p_sys->i_code == 303 || p_sys->i_code == 307 ||
+ p_sys->i_code == 308 ) &&
p_sys->psz_location != NULL )
{
+ msg_Dbg( p_access, "redirecting to %s (HTTP %d)",
+ p_sys->psz_location, p_sys->i_code );
p_access->psz_url = p_sys->psz_location;
p_sys->psz_location = NULL;
ret = VLC_ACCESS_REDIRECT;
2.
access/http: log redirect destination and handle HTTP 308
Previously, the HTTP access module would return VLC_ACCESS_REDIRECT
with no log messages for redirects (301, 302, 303, 307). If a
developer tried to debug a faulty redirection chain, they had to rely
on trial-and-error because they had no way to know where VLC was
being redirected.
A msg_Dbg statement is added to provide a clue about the redirect
destination and the associated HTTP status code.
Also, there is no HTTP 308 check here; it has the same semantics as
301 but preserves the request method. It is covered by RFC 7538 and
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20260412/2552af8d/attachment.htm>
More information about the vlc-devel
mailing list