This repository was archived by the owner on May 17, 2020. It is now read-only.
oEmbed short URL https issue #105
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using oEmbed with a short URL (e.g. http://youtu.be/JrtWhFtjXTA) on an HTTPS page, the following error will be shown in most browsers:
The attached pull request just ensures that the
onErrorcallback is called when the request toapi.longurl.orgfails, making sure that the client can appropriately react to the failure.Unfortunately, there is no
httpsversion ofapi.longurl.org, so it's not possible to use that instead. An ideal solution would put something in place that allows this to work over https as well. However, this PR would still be useful to have in place regardless in caseapi.longurl.orgwere to go down temporarily.