Fix off-by-one error in key/value resolution #975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a test to demonstrate the problem, which yielded this failure in test output: --- FAIL: TestGetPathParamAndPathParams (0.00s)
resty_test.go:44: Method: GET
resty_test.go:45: Path: /v1/users/[email protected]/100002{details}
request_test.go:1838: Expected [true], got [false]
request_test.go:1839: Expected [true], got [false]
resty_test.go:900: Response Status: 200 OK
resty_test.go:901: Response Time: 215.375µs
resty_test.go:902: Response Headers: map[Content-Length:[85] Content-Type:[text/plain; charset=utf-8] Date:[Sat, 22 Feb 2025 01:31:45 GMT]]
resty_test.go:903: Response Cookies: []
resty_test.go:904: Response Body: TestPathParamURLInput: text response: /v1/users/[email protected]/100002%7Bdetails%7D
Once fix was applied, test passed.