Skip to content

fix: findOperation issues with "/" paths#223

Merged
erunion merged 2 commits intomasterfrom
fix/findOperation-empty-path
Jul 16, 2020
Merged

fix: findOperation issues with "/" paths#223
erunion merged 2 commits intomasterfrom
fix/findOperation-empty-path

Conversation

@kanadgupta
Copy link
Copy Markdown
Contributor

@kanadgupta kanadgupta commented Jul 16, 2020

For Paths Objects that only contain /, findOperation() wasn't handling trailing slashes properly. For example, the ReadMe API has a / endpoint but findOperation() will return undefined for routes like https://dash.readme.com/api/v1 since it'll look for https://dash.readme.com/api/v1/.

Not sure if this is the best approach but I think it should be fine since the spec dictates the following:

The field name MUST begin with a forward slash (/)

meaning that all paths should contain a / at the bare minimum.

@kanadgupta kanadgupta requested a review from erunion July 16, 2020 00:52
@erunion erunion added the bug Something isn't working label Jul 16, 2020
@kanadgupta kanadgupta requested a review from erunion July 16, 2020 01:02
@erunion erunion merged commit ca1cad2 into master Jul 16, 2020
@erunion erunion deleted the fix/findOperation-empty-path branch July 16, 2020 01:13
erunion pushed a commit that referenced this pull request Feb 7, 2025
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](browserify/browserify-sign@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants