]> granicus.if.org Git - php/commitdiff
MFH
authorSascha Schumann <sas@php.net>
Wed, 15 Jan 2003 11:32:31 +0000 (11:32 +0000)
committerSascha Schumann <sas@php.net>
Wed, 15 Jan 2003 11:32:31 +0000 (11:32 +0000)
main/SAPI.h
sapi/thttpd/thttpd.c

index ae8714e4e1e0a0244df32d858287ed49b28cfd8e..9e04a042368e9d4b47850f5edec5dac8369d9d50 100644 (file)
@@ -84,6 +84,7 @@ typedef struct {
 
        zend_bool headers_only;
        zend_bool no_headers;
+       zend_bool headers_read;
 
        sapi_post_entry *post_entry;
 
@@ -117,7 +118,8 @@ typedef struct _sapi_globals_struct {
        char *default_charset;
        HashTable *rfc1867_uploaded_files;
        long post_max_size;
-    int options;
+       int options;
+       zend_bool sapi_started;
 } sapi_globals_struct;
 
 
@@ -183,6 +185,10 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC);
 SAPI_API char *sapi_get_default_content_type(TSRMLS_D);
 SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header TSRMLS_DC);
 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;
@@ -221,6 +227,10 @@ struct _sapi_module_struct {
        char *executable_location;
 
        int php_ini_ignore;
+
+       int (*get_fd)(int *fd TSRMLS_DC);
+
+       int (*force_http_10)(TSRMLS_D);
 };
 
 
@@ -254,7 +264,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data);
 SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
 SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data);
 
-#define STANDARD_SAPI_MODULE_PROPERTIES NULL, NULL, 0
+#define STANDARD_SAPI_MODULE_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
 
 #endif /* SAPI_H */
 
index fa161d4bd965ce1a6a4abef6f3af3cfc0a63c616..2a0334f3e1fa7996d7eb6cc30d2327ab7fb2cff4 100644 (file)
@@ -382,6 +382,12 @@ static int php_thttpd_startup(sapi_module_struct *sapi_module)
        return SUCCESS;
 }
 
+static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC)
+{
+       if (nfd) *nfd = TG(hc)->conn_fd;
+       return 0;
+}
+
 static sapi_module_struct thttpd_sapi_module = {
        "thttpd",
        "thttpd",
@@ -408,10 +414,15 @@ static sapi_module_struct thttpd_sapi_module = {
        sapi_thttpd_register_variables,
        NULL,                                                                   /* Log message */
 
+       NULL,                                                                   /* php.ini path override */
        NULL,                                                                   /* Block interruptions */
        NULL,                                                                   /* Unblock interruptions */
 
-       STANDARD_SAPI_MODULE_PROPERTIES
+       NULL,
+       NULL,
+       NULL,
+       0,
+       sapi_thttpd_get_fd
 };
 
 static void thttpd_module_main(int show_source TSRMLS_DC)