From: Sascha Schumann Date: Wed, 15 Jan 2003 11:32:31 +0000 (+0000) Subject: MFH X-Git-Tag: PHP_4_3_before_13561_fix~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18d55a08b3c43c8e615defc8d8b60efec9f24369;p=php MFH --- diff --git a/main/SAPI.h b/main/SAPI.h index ae8714e4e1..9e04a04236 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -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 */ diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index fa161d4bd9..2a0334f3e1 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -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)