Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 14, 2015

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.

cmb69 added 2 commits July 14, 2015 11:09
The built-in webserver does not yet implement the MKCALENDAR request method.
Let's change that.
@LukasReschke
Copy link

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When control enters with index=1 and ch=K, then another else-if is executed, doing nothing.

@nikic nikic self-assigned this Mar 3, 2016
@nikic
Copy link
Member

nikic commented Mar 3, 2016

@cmb69 Thanks for the explanation, now I got it! Merged as 2d4ad66.

@nikic nikic closed this Mar 3, 2016
@cmb69 cmb69 deleted the mkcalendar branch August 16, 2017 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants