Skip to content
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

HTTP 425 Too Early missing text in http_response_code() #16068

Open
kkmuffme opened this issue Sep 25, 2024 · 2 comments
Open

HTTP 425 Too Early missing text in http_response_code() #16068

kkmuffme opened this issue Sep 25, 2024 · 2 comments

Comments

@kkmuffme
Copy link

Description

The following code:

<?php
http_response_code( 425 );

The response status header does not include the text "Too Early"
It's missing in https://github.com/php/php-src/blob/master/main/http_status_codes.h#L61
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/425

PHP Version

8.3.x

Operating System

No response

@cmb69
Copy link
Member

cmb69 commented Sep 26, 2024

Thanks for reporting! Given that the RFC status is "proposed standard" and that according to MDN it is only implemented by Firefox so far, I don't think that we should add it to the list yet, let alone treat it as bug. You can use header() to send that response code anyway.

@kkmuffme
Copy link
Author

This is (and has been for years) already heavily used by CDNs e.g. Cloudflare supports (and uses it) for origin pulls (since at least 2019 afair)

Since nginx https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data supports it by default too, I think it should be handled in PHP.

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

No branches or pull requests

3 participants