FixTweet / FxTwitter

Fix broken Twitter/X embeds! Use multiple images, videos, polls, translations and more on Discord, Telegram and others
https://fxtwitter.com
MIT License
2.62k stars 77 forks source link

HEAD responses for redirects differ from GET #604

Closed sfan5 closed 9 months ago

sfan5 commented 9 months ago

I noticed this while testing for #603.

HEAD says 200:

$ curl -s -A "Mozilla/5.0" 'https://fxtwitter.com/github' -I 
HTTP/2 200 
date: Sat, 13 Jan 2024 12:54:06 GMT
content-type: text/plain; charset=UTF-8
allow: OPTIONS, GET, PURGE, HEAD
vary: Accept-Encoding, User-Agent
x-powered-by: fixtweet-main-6772518-2024-01-12T04:50:57
[...]

GET says 302:

$ curl -s -A "Mozilla/5.0" 'https://fxtwitter.com/github' -v 2>&1 | grep '^<'
< HTTP/2 302 
< date: Sat, 13 Jan 2024 12:54:47 GMT
< content-type: text/html;charset=UTF-8
< location: https://twitter.com/github
< cf-ray: 844dca304cc414cb-DUS
< cf-cache-status: HIT
< age: 336
[...]

I think this violates the HTTP standard but no idea if this could ever actually cause issues. Feel free to close if you don't think it's important.

dangeredwolf commented 9 months ago

Should be fixed now! 👍