]> granicus.if.org Git - php/commitdiff
MFH 1.150
authorSascha Schumann <sas@php.net>
Wed, 15 Jan 2003 11:29:05 +0000 (11:29 +0000)
committerSascha Schumann <sas@php.net>
Wed, 15 Jan 2003 11:29:05 +0000 (11:29 +0000)
sapi/apache/mod_php4.c

index a1666be02d8ce059c1175f38353b05a9a34f22cb..0f9eaeb074738ae8d48cd26a415e8bed3d08f834 100644 (file)
@@ -343,6 +343,34 @@ static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC)
 }
 /* }}} */
 
+/* {{{ sapi_apache_get_fd
+ */
+static int sapi_apache_get_fd(int *nfd TSRMLS_DC)
+{
+       request_rec *r = SG(server_context);
+       int fd;
+
+       fd = r->connection->client->fd;
+       
+       if (fd >= 0) {
+               if (nfd) *nfd = fd;
+               return 0;
+       }
+       return -1;
+}
+/* }}} */
+
+/* {{{ 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 = {
@@ -382,7 +410,12 @@ static sapi_module_struct apache_sapi_module = {
        unblock_alarms,                                 /* Unblock interruptions */
 #endif
 
-       STANDARD_SAPI_MODULE_PROPERTIES
+       NULL,                                                   /* default post reader */
+       NULL,                                                   /* treat data */
+       NULL,                                                   /* exe location */
+       0,                                                              /* ini ignore */
+       sapi_apache_get_fd,
+       sapi_apache_force_http_10
 };
 /* }}} */