Skip to content

Instantly share code, notes, and snippets.

@auroraeosrose
Created March 12, 2018 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auroraeosrose/0fa3f3cbd60fd99c217f624808850fe4 to your computer and use it in GitHub Desktop.
Save auroraeosrose/0fa3f3cbd60fd99c217f624808850fe4 to your computer and use it in GitHub Desktop.
This is only showing up right NOW for me in IIS10 with Fastcgi and PHP 7.2
This is NOT broken in PHP 7.1, so I'd argue this is a regression somewhere
<?php
//header('HTTP/1.1 403 Forbidden');
//header('HTTP/1.1 403 Forbidden', true, 403);
http_response_code(403);
Any line but the last gives me a 200 OK response
If you run the header code and then try to set the http_response_code you can't
Something in the header code has broken setting the reponse code correctly in fastcgi
No other code required for POC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment