summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/SAPI.c9
-rw-r--r--main/SAPI.h4
-rw-r--r--sapi/apache/mod_php4.c14
3 files changed, 25 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index f77c14ee11..6ebd98e7ce 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -860,6 +860,15 @@ SAPI_API int sapi_get_fd(int *fd TSRMLS_DC)
}
}
+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
diff --git a/main/SAPI.h b/main/SAPI.h
index 75f68b18fd..560330c34e 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -187,6 +187,7 @@ SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len TSRMLS_DC
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;
@@ -228,7 +229,8 @@ struct _sapi_module_struct {
int php_ini_ignore;
int (*get_fd)(int *fd TSRMLS_DC);
-
+
+ int (*force_http_10)(TSRMLS_D);
};
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index eac37883a7..ad7a1697bc 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -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
};
/* }}} */