zend_bool headers_only;
zend_bool no_headers;
+ zend_bool headers_read;
sapi_post_entry *post_entry;
char *default_charset;
HashTable *rfc1867_uploaded_files;
long post_max_size;
- int options;
+ int options;
+ zend_bool sapi_started;
} sapi_globals_struct;
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;
char *executable_location;
int php_ini_ignore;
+
+ int (*get_fd)(int *fd TSRMLS_DC);
+
+ int (*force_http_10)(TSRMLS_D);
};
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 */
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",
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)