-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento\Framework\Filesystem\Driver\Http depends on reason phrase OK #39546
Comments
Hi @jirichmiel. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @jirichmiel, Thanks for the report and collaboration! We have reviewed the codebase here: magento2/lib/internal/Magento/Framework/Filesystem/Driver/Http.php Lines 29 to 37 in e586f40
And also went through the link here and found that it does not necessarily return Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13725 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
@magento I am working on this |
Hi @ajith107! 👋 |
@magento add to contributors team |
@magento I am working on this |
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 onlyHTTP/1.1 200
. In that case Driver\Http will tell that given url does not exist although it exists.Examples
Proposed solution
Change line from
return !(strpos($status, '200 OK') === false);
to
return !(strpos($status, '200') === false);
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: