No description
Find a file
Fijxu 319991c7b8
All checks were successful
CI / build (push) Successful in 1m1s
fix(videoplayback): Use HEAD requests to get the location of the videoplayback URL before doing a POST
"RFC 1945 and RFC 2068 specify that the client is not allowed to change
the method on the redirected request. However, most existing user agent
implementations treat 302 as if it were a 303 response, performing a GET
on the Location field-value regardless of the original request method.
The status codes 303 and 307 have been added for servers that wish to
make unambiguously clear which kind of reaction is expected of the
client."

Before doing this, POST requests that got a 302 status code, get
converted automatically to GET requests by the standard, which should
not happen. That is why Invidious does 5 HEAD requests to get the
Location header and send a correct URL on the POST request (NOTE:
INVIDIOUS UPSTREAMS STILL USES GET REQUESTS TO GET THE VIDEO FROM
YOUTUBE, THAT IS SUBJECT TO CHANGE with https://github.com/iv-org/invidious/issues/5034:

164d764d55/src/invidious/routes/video_playback.cr (L48-L78)

Due to this the redirects, the Host header can also change, so if the
stream is open for a long time and it gets redirected to another URL,
the Host header used the old Host header instead of the new one returned
by the Location header on the HEAD request to googlevideo.com, making
the request fail.

I hope this shit works tho
2025-02-19 18:41:49 -03:00
.forgejo/workflows disable arm builds for now 2024-12-21 00:59:12 -03:00
.dockerignore fixup! Add version key to /stats and more arguments 2024-10-29 20:12:23 -03:00
.env Update docker-compose.yml and provide .env 2024-11-05 17:58:10 -03:00
.gitignore better 403 request handling 2024-12-13 17:24:03 -03:00
docker-compose.yml update dockerfile and docker compose file 2024-12-20 17:12:17 -03:00
Dockerfile update dockerfile and docker compose file 2024-12-20 17:12:17 -03:00
go.mod Support for prometheus /metrics endpoint 2024-11-06 00:36:54 -03:00
go.sum Support for prometheus /metrics endpoint 2024-11-06 00:36:54 -03:00
httppaths.go fix(videoplayback): Use HEAD requests to get the location of the videoplayback URL before doing a POST 2025-02-19 18:41:49 -03:00
LICENSE Initial commit 2020-10-24 00:32:25 +05:30
main.go fix(videoplayback): Use HEAD requests to get the location of the videoplayback URL before doing a POST 2025-02-19 18:41:49 -03:00
nginx.conf http3 but now in docker for my invidious instance 2024-04-28 14:43:43 -04:00
README.md v2 2024-10-29 16:19:47 -03:00
utils.go Display an error if panic 2024-10-31 18:29:39 -03:00

http3-ytproxy