File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class Response implements ResponseInterface {
1919 public function __construct (
2020 private ?int $ statusCode = null ,
2121 ResponseHeaders $ headers = null ,
22+ private ?Request $ request = null ,
2223 ) {
2324 $ this ->headers = $ headers ?? new ResponseHeaders ();
2425 $ this ->stream = new Stream ();
@@ -29,7 +30,8 @@ public function setExitCallback(callable $callback):void {
2930 }
3031
3132 public function reload ():void {
32- $ this ->redirect ("./ " );
33+ $ uri = $ this ->request ?->getUri() ?? new Uri ();
34+ $ this ->redirect ($ uri ->withPath ("./ " ));
3335 }
3436
3537 public function redirect (string |UriInterface $ uri , int $ statusCode = 303 ):void {
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ protected function rawurlencodeMatchZero(array $match):string {
152152 protected function filterUserInfo (string $ user , string $ pass = null ):string {
153153 $ userInfo = $ user ;
154154
155- if (strlen ($ pass ) > 0 ) {
155+ if (strlen ($ pass ?? "" ) > 0 ) {
156156 $ userInfo .= ": " ;
157157 $ userInfo .= $ pass ;
158158 }
You can’t perform that action at this time.
0 commit comments