Other content types support - #2
Conversation
| // If no Status header is sent, assume status code 200. | ||
| else { | ||
| $this->status_code = 200; | ||
| } |
There was a problem hiding this comment.
Is it right? Shouldn't HTTP response always include a status code?
There was a problem hiding this comment.
The issue here was that php-cgi doesn't add the Status header for 200 responses:
https://stackoverflow.com/a/79757436
I didn't try the suggestion of enabling "cgi.nph" because the docs says:
cgi.nph bool
If cgi.nph is enabled it will force cgi to always sent Status: 200 with every request.
So I thought it would return 200 despite the response code set...but I'll give a try and see.
There was a problem hiding this comment.
It works as well using the cgi.nph directive. Do you prefer using it instead of this "else"?
There was a problem hiding this comment.
I think I'd prefer cgi.nph just in case if the process fails.
|
LGTM, but I'd review that status code thing just in case. |
8dec359 to
ba4d42a
Compare
|
I saw that you've added |
ba4d42a to
77f4c42
Compare
This PR adds the possibility to post different types of content.