Skip to content

sapi/cli: support HTTP QUERY method in built-in server#22615

Open
Afcyy wants to merge 2 commits into
php:masterfrom
Afcyy:sapi-cli-query-method
Open

sapi/cli: support HTTP QUERY method in built-in server#22615
Afcyy wants to merge 2 commits into
php:masterfrom
Afcyy:sapi-cli-query-method

Conversation

@Afcyy

@Afcyy Afcyy commented Jul 6, 2026

Copy link
Copy Markdown

PHP’s built-in development server currently rejects requests using the QUERY
HTTP method with a 501 Not Implemented response before they reach the router
script.

QUERY is now standardized by RFC 10008. This adds it to the CLI server HTTP
parser so requests are accepted and passed through like other recognized HTTP
methods.

A regression test is included to verify that QUERY reaches the router and is
exposed through $_SERVER['REQUEST_METHOD'].

@Afcyy

Afcyy commented Jul 6, 2026

Copy link
Copy Markdown
Author

Small related update: Laravel has merged native QUERY route support in laravel/framework#60655.

This PR should be useful for Laravel’s local development workflow as well.

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add an entry into the UPGRADING file?

@Afcyy

Afcyy commented Jul 7, 2026

Copy link
Copy Markdown
Author

Done, added under Changes in SAPI modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants