handlers
handlers copied to clipboard
Fix whitespace handling in `X-Forwarded-For` header parsing
Fixes #227
Summary of Changes
- Split
X-Forwarded-Forusing space rather than comma-space. - Trim whitespace from resulting value.
- Add tests. (Including for
Forwardedparsing, which didn't have this problem.)
I don't know how to interpret the CircleCI failure.
@adam-p thank you for working on this. In order to fix the pipeline issue. You need to add line //go:build go1.8 at the top of the file handlers_go18_test.go in the project.
@adam-p If you would resolve the conflict with this pull request we can get it reviewed and merged. Thanks!