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

Use PathEscape instead of QueryEscape in httpGetter #49

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

davidmcleish
Copy link
Contributor

@davidmcleish davidmcleish commented Sep 8, 2022

Just a couple of small fixes to http.go:

  • Use PathEscape instead of QueryEscape for building request URLs. The HTTP handler uses PathUnescape so this roundtrips keys containing space characters correctly.
  • Convert error message from []byte to string.

Copy link
Contributor

@thrawn01 thrawn01 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! This is indeed an issue! Ideally the key should never have been in the URL path as some routers do not path escape in the correct order and can therefore cause upstream routers to incorrectly route the URL. It should have been a query parameter instead. This fix solves the problem for us just fine. thank you again!

@thrawn01 thrawn01 merged commit 3c50bed into mailgun:master Dec 20, 2022
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