diff --git a/runtime/mux_test.go b/runtime/mux_test.go index d3b578b9adc..0bdc72c2e23 100644 --- a/runtime/mux_test.go +++ b/runtime/mux_test.go @@ -391,6 +391,27 @@ func TestMuxServeHTTP(t *testing.T) { respStatus: http.StatusNotFound, unescapingMode: runtime.UnescapingModeAllCharacters, }, + { + patterns: []stubPattern{ + { + method: "GET", + ops: []int{ + int(utilities.OpLitPush), 0, + int(utilities.OpPush), 0, + int(utilities.OpConcatN), 1, + int(utilities.OpCapture), 1, + int(utilities.OpLitPush), 2}, + pool: []string{"foo", "id", "bar"}, + }, + }, + reqMethod: "GET", + reqPath: "/foo/success%2fwith%2Fspace/bar", + headers: map[string]string{ + "Content-Type": "application/json", + }, + respStatus: http.StatusNotFound, + unescapingMode: runtime.UnescapingModeLegacy, + }, { patterns: []stubPattern{ {