-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fix validateHttpVersion to be RFC 1945 and RFC 7230 compliant #4368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
What does "." mean @sreichel |
@leissbua was a comment on your first commit. The change you have reverted, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2:
The reason-phrase element exists for the sole purpose of providing a textual description associated with the numeric status code, mostly out of deference to earlier Internet application protocols that were more frequently used with interactive text clients. A client SHOULD ignore the reason-phrase content.
Thanks for that info. |
Description (*)
Mage_HTTP_Client_Curl
is expecting the HTTP Response Header to have 3 elements.However, the Reason-Phrase is optional, e.g. Apple Pay does not return OK Reason-Phrase on the current
validationURL()
endpoint which is HTTP 1.1. I fixed the code to allow 2 or 3 elements as it does for HTTP 2.0 in the current version