fix: use EscapedPath as header value when RawPath is empty
This commit is contained in:
parent
25e12aee14
commit
fe32a7e584
4 changed files with 28 additions and 13 deletions
|
@ -106,6 +106,16 @@ func TestReplacePathRegex(t *testing.T) {
|
|||
expectedPath: "/aaa/bbb",
|
||||
expectedRawPath: "/aaa%2Fbbb",
|
||||
},
|
||||
{
|
||||
desc: "path with percent encoded backspace char",
|
||||
path: "/foo/%08bar",
|
||||
config: dynamic.ReplacePathRegex{
|
||||
Replacement: "/$1",
|
||||
Regex: `^/foo/(.*)`,
|
||||
},
|
||||
expectedPath: "/\bbar",
|
||||
expectedRawPath: "/%08bar",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue