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).
}
}
+SAPI_API int sapi_force_http_10(TSRMLS_D)
+{
+ if (sapi_module.force_http_10) {
+ return sapi_module.force_http_10(TSRMLS_C);
+ } else {
+ return -1;
+ }
+}
+
/*
* Local variables:
* tab-width: 4
SAPI_API void sapi_activate_headers_only(TSRMLS_D);
SAPI_API int sapi_get_fd(int *fd TSRMLS_DC);
+SAPI_API int sapi_force_http_10(TSRMLS_D);
struct _sapi_module_struct {
char *name;
int php_ini_ignore;
int (*get_fd)(int *fd TSRMLS_DC);
-
+
+ int (*force_http_10)(TSRMLS_D);
};
}
/* }}} */
+/* {{{ 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 = {
NULL, /* treat data */
NULL, /* exe location */
0, /* ini ignore */
- sapi_apache_get_fd
+ sapi_apache_get_fd,
+ sapi_apache_force_http_10
};
/* }}} */