[Solved] Force HTTP/1.0 response
Added by 2ge over 8 years ago
Hi guys,
is there any way how to force HTTP/1.0 response, even client asking for 1.1 ?
The problem is, Cloudflare is adding some headers when there is 1.1 response, and it breaks some clients.
I am using lighttpd/1.4.41 and PHP Version 5.6.27
Any workaround for this ?
Apache has implemented something like this:
http://regilero.github.io/apache/english/2008/08/29/force_http_1.0_response_when_php_is_there/
Replies (4)
RE: Force HTTP/1.0 response - Added by gstrauss over 8 years ago
Did you try a little RTFM before posting?
Docs_ConfigurationOptions
Server_protocol-http11Details
RE: Force HTTP/1.0 response - Added by 2ge over 8 years ago
thanks for server.protocol-http11 option - I guess, when I disable it, then it will be served just HTTP/1.0 response. I was searching for HTTP 1.0 and lighttpd...
Is this possible to control server.protocol-http11 from PHP somehow ? According POST variables in 99% I need respond HTTP/1.1, but for backward compatibility with some clients I need HTTP/1.0
Thank you.
RE: Force HTTP/1.0 response - Added by gstrauss over 8 years ago
No, you can't do this from PHP. You can configure lighttpd to set server.protocol-http11 = "disable" for specific client user agents. Please see the lighttpd Docs_Configuration
RE: Force HTTP/1.0 response - Added by 2ge over 8 years ago
Thanks for clarification, I know about HTTP USER AGENT config condition, I would need it from PHP, similar as it is done in first message via $_SERVER variable.
But it is better than nothing :)