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

[NT] Normalise paths before proxying. #2068

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

timdawborn
Copy link
Contributor

@timdawborn timdawborn commented Oct 6, 2023

Description, Motivation and Context

Due to various layers of proxying, sometimes a proxied request ends up with multiple leading slashes. Some web servers do not not normalise request paths, leading to 404's.

This PR normalises the received request path on the mock server before matching against contract paths, and normalises the received request paths when proxying the request.

Checklist:

  • I've added/updated tests to cover my changes
  • I've created an issue associated with this PR

@timdawborn timdawborn marked this pull request as ready for review October 6, 2023 08:24
@timdawborn timdawborn requested a review from a team as a code owner October 6, 2023 08:24
@timdawborn timdawborn requested review from flavray and removed request for a team October 6, 2023 08:24
Copy link
Contributor

@flavray flavray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sheep It

@timdawborn timdawborn merged commit 996cef8 into master Oct 9, 2023
3 checks passed
@timdawborn timdawborn deleted the no-ticket-normalise-paths-before-proxying branch October 9, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants