[wp-trac] [WordPress Trac] #34335: URL shorteners ( redirects) should to be supported by the embed handling for couple of hopes
WordPress Trac
noreply at wordpress.org
Sat Oct 17 16:50:51 UTC 2015
#34335: URL shorteners ( redirects) should to be supported by the embed handling
for couple of hopes
--------------------------+------------------------------
Reporter: pbearne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: trunk
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
--------------------------+------------------------------
Changes (by swissspidy):
* keywords: => 2nd-opinion
Comment:
Thanks for creating the ticket after our recent chat.
Currently, when pasting a URL like http://bit.ly/1Muwesb (a YouTube
video),
`http://www.youtube.com/oembed?url=http://bit.ly/1Muwesb&format=json` gets
called in the end, which of course doesn't work. That's because WordPress
follows the redirect to YouTube, but passes the original URL to the
endpoint instead of the final redirect URL.
To make this work, we'd need to store the final redirect URL, which is
currently not possible with the HTTP API. This means there needs to be an
equivalent to`WP_Http::handle_redirects` that doesn't just redirect, but
returns the final URL.
This would certainly make things more complex and I'm not sure if it's
worth the effort and even the desired behaviour.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34335#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list