Add support for MKCALENDAR request method in CLI web server#1417
Closed
cmb69 wants to merge 2 commits intophp:masterfrom
Closed
Add support for MKCALENDAR request method in CLI web server#1417cmb69 wants to merge 2 commits intophp:masterfrom
cmb69 wants to merge 2 commits intophp:masterfrom
Conversation
The built-in webserver does not yet implement the MKCALENDAR request method. Let's change that.
|
We (@owncloud) have noticed this while adding more our integration tests which run using Behat in the PHP CLI server. This effectively prevents us from adding some more tests: owncloud/core#22731 (comment) Any chance to get this reviewed and merged? The code works for me here and we would really love to have this in 🚀 😄 |
| if (index == 1 && ch == 'O') { | ||
| parser->method = PHP_HTTP_MOVE; | ||
| } else if (index == 3 && ch == 'A') { | ||
| parser->method = PHP_HTTP_MKCALENDAR; |
Member
There was a problem hiding this comment.
I can see that this code works, but I can't get my head around why it works. When control enters with index=1 (and ch=K), I'd expect parser->method to be set to NOT_IMPLEMENTED, so that this branch is not entered again for a higher index.
What am I missing?
Member
Author
There was a problem hiding this comment.
When control enters with index=1 and ch=K, then another else-if is executed, doing nothing.
Member
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.
As it is now the CLI web server only implements certain request methods. All other request methods cause it to respond with 501 Not Implemented. I'm not sure that this is really useful, but at least we should strive to accept all well defined methods.
See also https://bugs.php.net/69953.