File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1040,7 +1040,7 @@ public function resolveRelativeURI(string $uri)
10401040 * NOTE: We don't use removeDotSegments in this
10411041 * algorithm since it's already done by this line!
10421042 */
1043- $ relative = new self ($ uri );
1043+ $ relative = new self ($ uri, $ this -> rawQueryString );
10441044
10451045 if ($ relative ->getScheme () === $ this ->getScheme ()) {
10461046 $ relative = $ relative ->withScheme ('' );
Original file line number Diff line number Diff line change @@ -94,6 +94,17 @@ public function testGetRemembersBaseURI(): void
9494 $ this ->assertSame ('http://www.foo.com/api/v1/products ' , $ options [CURLOPT_URL ]);
9595 }
9696
97+ public function testGetPreservesDottedQueryKeysFromBaseURI (): void
98+ {
99+ $ request = $ this ->getRequest (['baseURI ' => 'https://api.example.com/resource?foo.bar=baz ' ]);
100+
101+ $ request ->get ('' );
102+
103+ $ options = $ request ->curl_options ;
104+
105+ $ this ->assertSame ('https://api.example.com/resource?foo.bar=baz ' , $ options [CURLOPT_URL ]);
106+ }
107+
97108 /**
98109 * @see https://github.com/codeigniter4/CodeIgniter4/issues/1029
99110 */
You can’t perform that action at this time.
0 commit comments