Magento\Framework\Filesystem\Driver\Http depends on reason phrase OK #39546
Open
Description
Summary
Method Magento\Framework\Filesystem\Driver\Http::isExists that determines whether given url exists depends on that remote server returns status header with 200 OK
(e.g: HTTP/1.1 200 OK
), but reason phrase OK is not required (https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2). Some server may return only HTTP/1.1 200
. In that case Driver\Http will tell that given url does not exist although it exists.
Examples
~$ curl -i "https://acs4.editionguard.com/fulfillment/URLLink.acsm"
HTTP/1.1 200
Content-Type: application/vnd.adobe.adept+xml
Date: Wed, 15 Jan 2025 18:49:25 GMT
Server: Apache/2.4.39 (Amazon) OpenSSL/1.0.2k-fips
Content-Length: 139
Connection: keep-alive
Proposed solution
Change line from
return !(strpos($status, '200 OK') === false);
to
return !(strpos($status, '200') === false);
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it