@@ -58,6 +58,17 @@ public static Stream<Arguments> validRequestUris() {
58
58
.build (),
59
59
URI .create (
60
60
"http://localhost:8080/foo/v1/namespaces/ns/tables?pageToken=1234&pageSize=10" )),
61
+ Arguments .of (
62
+ ImmutableHTTPRequest .builder ()
63
+ .baseUri (
64
+ URI .create ("http://localhost:8080/foo/" )) // trailing slash should be removed
65
+ .method (HTTPRequest .HTTPMethod .GET )
66
+ .path ("v1/namespaces/ns/tables/" ) // trailing slash should be removed
67
+ .putQueryParameter ("pageToken" , "1234" )
68
+ .putQueryParameter ("pageSize" , "10" )
69
+ .build (),
70
+ URI .create (
71
+ "http://localhost:8080/foo/v1/namespaces/ns/tables?pageToken=1234&pageSize=10" )),
61
72
Arguments .of (
62
73
ImmutableHTTPRequest .builder ()
63
74
.baseUri (URI .create ("http://localhost:8080/foo" ))
@@ -71,7 +82,15 @@ public static Stream<Arguments> validRequestUris() {
71
82
.method (HTTPRequest .HTTPMethod .GET )
72
83
.path ("http://authserver.com/token" ) // absolute path HTTP
73
84
.build (),
74
- URI .create ("http://authserver.com/token" )));
85
+ URI .create ("http://authserver.com/token" )),
86
+ Arguments .of (
87
+ ImmutableHTTPRequest .builder ()
88
+ .baseUri (URI .create ("http://localhost:8080/foo" ))
89
+ .method (HTTPRequest .HTTPMethod .GET )
90
+ // absolute path with trailing slash: should be preserved
91
+ .path ("http://authserver.com/token/" )
92
+ .build (),
93
+ URI .create ("http://authserver.com/token/" )));
75
94
}
76
95
77
96
@ Test
0 commit comments