We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c6a789f + 64627fd commit d8ad0b0Copy full SHA for d8ad0b0
src/Request.php
@@ -39,15 +39,14 @@ public function getRequestTarget(): string
39
if ($this->requestTarget !== null) {
40
return $this->requestTarget;
41
}
42
-
43
- $target = $this->uri->getPath();
44
- if ($target == '') {
45
- $target = '/';
46
- }
47
- if ($this->uri->getQuery() != '') {
48
- $target .= '?' . $this->uri->getQuery();
49
50
+
+ parse_str($this->uri->getQuery(), $query);
+ $query = $this->getQueryParams() + $query; //attribute value first
+ $query = http_build_query($query);
+ $target = $this->uri->getPath() ?: '/';
+ $target = empty($query) ? $target : $target . '?' . $query;
51
return $target;
52
53
0 commit comments