You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Laminas\Http\PhpEnvironment\Request::detectBaseUrl, the comparison of e.g. PHP_SELF, SCRIPT_NAME etc. is case-sensitive.
This leads to a bug with a bug in the IIS, which sometimes defines the paths in upper case after it was restarted. Another restart is neccesary to fix this.
However, I think it would be good if a strtolower would be used in the comparison of these functions to prevent effects of the case right away.
Q
A
Version(s)
2.19.0
Summary
The detection of the base url is case-sensitive
Current behavior
Based on the different writing, the base URL cannot be detected correctly.
How to reproduce
Let's assume the $_SERVER-Array contains these variables:
and the $requestUri would be /my_project/public/api/v1/endpoint, than it comes in the 2nd case to the conclusion, that there is // No match whatsoever, while in the first, correct case // Directory portion of base path matches. is the result.
Expected behavior
Thie case of the PHP_SELF should not matter in identifying the base path. URLs must not be case-sensitive, so there should be no reason to not compare this with lower case.
The text was updated successfully, but these errors were encountered:
Bug Report
In
Laminas\Http\PhpEnvironment\Request::detectBaseUrl
, the comparison of e.g. PHP_SELF, SCRIPT_NAME etc. is case-sensitive.This leads to a bug with a bug in the IIS, which sometimes defines the paths in upper case after it was restarted. Another restart is neccesary to fix this.
However, I think it would be good if a
strtolower
would be used in the comparison of these functions to prevent effects of the case right away.Summary
The detection of the base url is case-sensitive
Current behavior
Based on the different writing, the base URL cannot be detected correctly.
How to reproduce
Let's assume the $_SERVER-Array contains these variables:
But in the error-case, it would be like this
and the
$requestUri
would be/my_project/public/api/v1/endpoint
, than it comes in the 2nd case to the conclusion, that there is// No match whatsoever
, while in the first, correct case// Directory portion of base path matches.
is the result.Expected behavior
Thie case of the PHP_SELF should not matter in identifying the base path. URLs must not be case-sensitive, so there should be no reason to not compare this with lower case.
The text was updated successfully, but these errors were encountered: