Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES
. The sapi_get_fd() function was removed.
. The sapi_get_target_uid() function was removed.
. The sapi_get_target_gid() function was removed.
. The sapi_activate_headers_only() function was removed.
. Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses
CLOCK_MONOTONIC on POSIX platforms.
. The INIT_CLASS_ENTRY_INIT_METHODS() macro, which was previously used as
Expand Down
39 changes: 0 additions & 39 deletions main/SAPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,45 +360,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.
*/
Expand Down
1 change: 0 additions & 1 deletion main/SAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,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()
Expand Down
Loading