-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Twitter returns a 404 for t.co links if "bot" is included in the user agent header #13120
Comments
Is this all Twitter links or just some? If it's just some, can you give us an example of a link that doesn't form a preview? |
Oh, from the log sample: https://twitter.com/CM_Memorabili/status/1541402380972879872 The source code is archived at sample.txt |
But it's just the short url (t.co) which has problems.. If I paste the long url - twitter.com - it works. |
I wonder if we're not processing the 301 redirect somehow. |
The problem looks to be alleviated if Attempting this with a local homeserver and setting a breakpoint on this line, I found that the following response headers are returned to Synapse from querying t.co: Request headers:
Response headers:
changing this line from synapse/synapse/rest/media/v1/preview_url_resource.py Lines 411 to 413 in 148fe58
|
Sorry but this is all too technical for me.. Is there something I can do or just wait for a fix? |
Wait for a fix. (The comments above will help us to understand how to fix the issue) |
Ironically (?) I have no idea of a solution here without special-casing t.co. 😢 |
Changing the user-agent no longer worked for me... 😢 |
Description
Hello,
I have some RSS feed in a Matrix room and since a few days already, some Twitter links won't show any preview.
Steps to reproduce
Homeserver
woodpeckersnest.space
Synapse Version
{"server":{"name":"Synapse","version":"1.61.0"}}
Installation Method
Other (please mention below)
Platform
I'm using the matrix-docker-ansible-deploy playbook on Debian 11 VPS
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: