mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
add a "force HTTP/1.0 response" facility to the SAPI layer
this is necessary, when you want to take over control of a connection and the web server is doing stupid things by default (like enabling chunked transfer encoding for no reason).
This commit is contained in:
parent
b9447c2f49
commit
2b95b3c83b
3 changed files with 25 additions and 2 deletions
|
@ -360,6 +360,17 @@ static int sapi_apache_get_fd(int *nfd TSRMLS_DC)
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ sapi_apache_force_http_10
|
||||
*/
|
||||
static int sapi_apache_force_http_10(TSRMLS_D)
|
||||
{
|
||||
request_rec *r = SG(server_context);
|
||||
|
||||
r->proto_num = HTTP_VERSION(1,0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* {{{ sapi_module_struct apache_sapi_module
|
||||
*/
|
||||
static sapi_module_struct apache_sapi_module = {
|
||||
|
@ -403,7 +414,8 @@ static sapi_module_struct apache_sapi_module = {
|
|||
NULL, /* treat data */
|
||||
NULL, /* exe location */
|
||||
0, /* ini ignore */
|
||||
sapi_apache_get_fd
|
||||
sapi_apache_get_fd,
|
||||
sapi_apache_force_http_10
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue