Trailing slash in URL breaks oEmbed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 254
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Title: Trailing slash in URL breaks oEmbed
Issue found of: March 24th, 2021
Scope(s):
- oEmbed
Steps to reproduce:
Example taken from your docs.
This works:
curl "https://soundcloud.com/oembed" -d 'format=json' -d 'url=https://soundcloud.com/forss/flickermood'
{"version":1.0,"type":"rich","provider_name":"SoundCloud","provider_url":"https://soundcloud.com","height":400,"width":"100%","title":"Flickermood by Forss","description":"From the Soulhack album, recently featured in this ad <a href=\"https://www.dswshoes.com/tv_commercial.jsp?m=october2007\">https://www.dswshoes.com/tv_commercial.jsp?m=october2007</a> ","thumbnail_url":"https://i1.sndcdn.com/artworks-000067273316-smsiqx-t500x500.jpg","html":"<iframe width=\"100%\" height=\"400\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?visual=true&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F293&show_artwork=true\"></iframe>","author_name":"Forss","author_url":"https://soundcloud.com/forss"}%
This does not work:
curl -v "https://soundcloud.com/oembed" -d 'format=json' -d 'url=https://soundcloud.com/forss/flickermood/'
{...}
HTTP/1.1 404 Not Found
{...}
Expected behaviour:
Url with trailing slash should work, alternatively make it clear in the docs trailing slashes are not allowed.
Actual behaviour:
HTTP/1.1 404 Not Found
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two requests against the /oembed endpoint from the SoundCloud oEmbed documentation, comparing the URL with and without a trailing slash. Read the oEmbed documentation and the endpoint handling to determine the intended behavior; done means trailing-slash URLs work or the documentation clearly states that they are unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100