phar: Support DELETE, HEAD and PUT HTTP methods in Phar::webPhar#2493
Closed
cweiske wants to merge 1 commit intophp:PHP-7.0from
cweiske:issue-51918
Closed
phar: Support DELETE, HEAD and PUT HTTP methods in Phar::webPhar#2493cweiske wants to merge 1 commit intophp:PHP-7.0from cweiske:issue-51918
cweiske wants to merge 1 commit intophp:PHP-7.0from
cweiske:issue-51918
Conversation
Member
weltling
reviewed
May 1, 2017
| || !strcmp(SG(request_info).request_method, "GET") | ||
| || !strcmp(SG(request_info).request_method, "HEAD") | ||
| || !strcmp(SG(request_info).request_method, "POST") | ||
| || !strcmp(SG(request_info).request_method, "PUT") |
There was a problem hiding this comment.
Any particular reason to change the condition order? GET and POST were probably the common case, so would profit from returning earlier from the condition anyway.
Thanks.
|
@nikic seems fine for 7.0 here as well. The condition order is not critical, might be just checked. Thanks. |
Contributor
Author
|
I ordered it alphabetically because it made sense to have it easy to read, but I'll change that to GET+POST first. |
Contributor
Author
Member
|
LGTM @cweiske the target branch is wrong, target 7.0 please. |
Up to now only GET and POST requests could be handled with Phar::webPhar(), which is insufficient for today's REST APIs. This patch expands the list of supported HTTP methods.
Contributor
Author
|
Based my patch on |
|
Merged with c0c0871. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Up to now only GET and POST requests could be handled with Phar::webPhar(),
which is insufficient for today's REST APIs.
This patch expands the list of supported HTTP methods.
Resolves: https://bugs.php.net/bug.php?id=51918