Commit eb92f3d
Michael Sullivan
Fix off-by-one error in key/value resolution
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/sample@sample.com/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/sample@sample.com/100002%7Bdetails%7D
Once fix was applied, test passed.1 parent 1e19d6b commit eb92f3d
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1827 | 1827 | | |
1828 | 1828 | | |
1829 | 1829 | | |
1830 | | - | |
| 1830 | + | |
| 1831 | + | |
1831 | 1832 | | |
1832 | 1833 | | |
1833 | | - | |
| 1834 | + | |
1834 | 1835 | | |
1835 | 1836 | | |
1836 | 1837 | | |
| |||
0 commit comments