Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fetch): stricter source URL type-checking #818

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Jun 5, 2023

🚥 Fixes #816

🧰 Changes

This reworks the fix I had in #817 to utilize the URL constructor to construct the URL that we pass in the x-readme-source-url header. That way we can properly encode weird characters like in #817, in addition to also ensuring that the string itself is a valid URL.

🧬 QA & Testing

Check out the new test case I added.

@kanadgupta kanadgupta added bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Jun 5, 2023
@kanadgupta kanadgupta requested review from erunion and RyanGWU82 June 5, 2023 15:26
@kanadgupta kanadgupta marked this pull request as ready for review June 5, 2023 15:26
@kanadgupta kanadgupta merged commit d082473 into next Jun 5, 2023
@kanadgupta kanadgupta deleted the fix/stricter-source-URL-typechecking branch June 5, 2023 15:46
kanadgupta pushed a commit that referenced this pull request Jun 5, 2023
## [8.6.4-next.3](v8.6.4-next.2...v8.6.4-next.3) (2023-06-05)

### Bug Fixes

* **fetch:** stricter source URL type-checking ([#818](#818)) ([d082473](d082473))

[skip ci]
kanadgupta pushed a commit that referenced this pull request Jun 5, 2023
## [8.6.4](v8.6.3...v8.6.4) (2023-06-05)

### Bug Fixes

* empty commit to trigger patch release ([71cf84b](71cf84b))
* **fetch:** encode parameters in source URL ([#817](#817)) ([ff86384](ff86384))
* **fetch:** stricter source URL type-checking ([#818](#818)) ([d082473](d082473))

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"is not a legal HTTP header value" errors when syncing docs
2 participants