diff --git a/main/SAPI.c b/main/SAPI.c index 51997c041760..534cc3a55202 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -355,45 +355,6 @@ SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len) return 0; } -SAPI_API void sapi_activate_headers_only(void) -{ - if (SG(request_info).headers_read == 1) - return; - SG(request_info).headers_read = 1; - zend_llist_init(&SG(sapi_headers).headers, sizeof(sapi_header_struct), - (void (*)(void *)) sapi_free_header, 0); - SG(sapi_headers).send_default_content_type = 1; - - /* SG(sapi_headers).http_response_code = 200; */ - SG(sapi_headers).http_status_line = NULL; - SG(sapi_headers).mimetype = NULL; - SG(read_post_bytes) = 0; - SG(request_info).request_body = NULL; - SG(request_info).current_user = NULL; - SG(request_info).no_headers = 0; - SG(request_info).post_entry = NULL; - SG(global_request_time) = 0; - - /* - * It's possible to override this general case in the activate() callback, - * if necessary. - */ - if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) { - SG(request_info).headers_only = 1; - } else { - SG(request_info).headers_only = 0; - } - if (SG(server_context)) { - SG(request_info).cookie_data = sapi_module.read_cookies(); - if (sapi_module.activate) { - sapi_module.activate(); - } - } - if (sapi_module.input_filter_init ) { - sapi_module.input_filter_init(); - } -} - /* * Called from php_request_startup() for every request. */ diff --git a/main/SAPI.h b/main/SAPI.h index 3d7f662b30f4..7af65e85dd38 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -222,7 +222,6 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len); SAPI_API char *sapi_get_default_content_type(void); SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header); SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len); -SAPI_API void sapi_activate_headers_only(void); SAPI_API double sapi_get_request_time(void); END_EXTERN_C()