/PHP-8.1/main/ |
H A D | SAPI.c | 165 if (SG(request_info).post_entry && SG(request_info).content_type_dup) { in sapi_handle_post() 248 SG(post_read) = 1; in sapi_read_post_block() 256 if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) { in SAPI_POST_READER_FUNC() 258 SG(request_info).content_length, SG(post_max_size)); in SAPI_POST_READER_FUNC() 282 if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) { in SAPI_POST_READER_FUNC() 450 SG(post_read) = 0; in sapi_activate() 555 SG(request_info).auth_digest = SG(request_info).auth_user = SG(request_info).auth_password = NULL; in sapi_initialize_empty_request() 669 if (SG(headers_sent) && !SG(request_info).no_headers) { in sapi_header_op() 843 if (SG(headers_sent) || SG(request_info).no_headers) { in sapi_send_headers() 1011 …if (!SG(request_info).path_translated || (VCWD_STAT(SG(request_info).path_translated, &SG(global_s… in sapi_get_stat() [all …]
|
H A D | php_content_types.c | 34 if (!strcmp(SG(request_info).request_method, "POST")) { in SAPI_POST_READER_FUNC() 35 if (NULL == SG(request_info).post_entry) { in SAPI_POST_READER_FUNC()
|
H A D | php_variables.c | 467 c_var = SG(request_info).query_string; in SAPI_TREAT_DATA_FUNC() 475 c_var = SG(request_info).cookie_data; in SAPI_TREAT_DATA_FUNC() 659 if (SG(request_info).argc) { in php_build_argv() 660 ZVAL_LONG(&argc, SG(request_info).argc); in php_build_argv() 665 if (SG(request_info).argc) { in php_build_argv() 696 if (SG(request_info).auth_user) { in php_register_server_variables() 700 if (SG(request_info).auth_password) { in php_register_server_variables() 704 if (SG(request_info).auth_digest) { in php_register_server_variables() 780 !SG(headers_sent) && in php_auto_globals_create_post() 781 SG(request_info).request_method && in php_auto_globals_create_post() [all …]
|
H A D | fopen_wrappers.c | 358 path_info = SG(request_info).request_uri; 393 } else if (SG(request_info).path_translated) { 395 strlen(SG(request_info).path_translated), 0); 416 } else if (SG(request_info).path_translated) { 418 strlen(SG(request_info).path_translated), 0); 434 if (SG(request_info).path_translated) { 435 efree(SG(request_info).path_translated); 436 SG(request_info).path_translated = NULL; 451 if (SG(request_info).path_translated) { 452 efree(SG(request_info).path_translated); [all …]
|
H A D | main.c | 507 } else if (SG(default_charset) && SG(default_charset)[0]) { in php_get_internal_encoding() 508 return SG(default_charset); in php_get_internal_encoding() 516 } else if (SG(default_charset) && SG(default_charset)[0]) { in php_get_input_encoding() 517 return SG(default_charset); in php_get_input_encoding() 525 } else if (SG(default_charset) && SG(default_charset)[0]) { in php_get_output_encoding() 526 return SG(default_charset); in php_get_output_encoding() 1376 !SG(headers_sent) && in php_error_cb() 1404 if (SG(request_info).current_user) { in php_get_current_user() 1457 SG(request_info).current_user = estrndup(pwd->pw_name, SG(request_info).current_user_length); in php_get_current_user() 1785 SG(sapi_started) = 1; in php_request_startup() [all …]
|
H A D | rfc1867.c | 194 ZEND_HASH_FOREACH_VAL(SG(rfc1867_uploaded_files), el) { in destroy_uploaded_files_hash() 198 zend_hash_destroy(SG(rfc1867_uploaded_files)); in destroy_uploaded_files_hash() 199 FREE_HASHTABLE(SG(rfc1867_uploaded_files)); in destroy_uploaded_files_hash() 258 SG(read_post_bytes) += actual_read; in fill_buffer() 706 if (SG(post_max_size) > 0 && SG(request_info).content_length > SG(post_max_size)) { 765 SG(rfc1867_uploaded_files) = uploaded_files; 777 event_start.content_length = SG(request_info).content_length; 880 event_formdata.post_bytes_processed = SG(read_post_bytes); 901 event_formdata.post_bytes_processed = SG(read_post_bytes); 1093 event_file_end.post_bytes_processed = SG(read_post_bytes); [all …]
|
H A D | SAPI.h | 135 # define SG(v) ZEND_TSRMG_FAST(sapi_globals_offset, sapi_globals_struct *, v) macro 139 # define SG(v) (sapi_globals.v)
|
/PHP-8.1/sapi/fpm/fpm/ |
H A D | fpm_main.c | 432 size_t remaining = SG(request_info).content_length - SG(read_post_bytes); in sapi_cgi_read_post() 578 php_self = SG(request_info).request_uri ? SG(request_info).request_uri : ""; in sapi_cgi_register_variables() 758 if (SG(sapi_started)) { in sapi_cgi_deactivate() 1657 SG(headers_sent) = 1; in main() 1695 SG(headers_sent) = 1; in main() 1710 SG(headers_sent) = 1; in main() 1729 SG(server_context) = NULL; in main() 1733 SG(headers_sent) = 1; in main() 1746 SG(headers_sent) = 1; in main() 1876 SG(server_context) = NULL; in main() [all …]
|
H A D | fpm_php.c | 179 return SG(request_info).path_translated; in fpm_php_script_filename() 184 return (char *) SG(request_info).request_uri; in fpm_php_request_uri() 189 return (char *) SG(request_info).request_method; in fpm_php_request_method() 194 return SG(request_info).query_string; in fpm_php_query_string() 199 return SG(request_info).auth_user; in fpm_php_auth_user() 204 return SG(request_info).content_length; in fpm_php_content_length()
|
H A D | fpm_status.c | 150 if (!SG(request_info).request_uri) { in fpm_status_handle_request() 155 …if (fpm_status_ping_uri && fpm_status_ping_response && !strcmp(fpm_status_ping_uri, SG(request_inf… in fpm_status_handle_request() 160 SG(sapi_headers).http_response_code = 200; in fpm_status_handle_request() 163 if (SG(request_info).headers_only) { in fpm_status_handle_request() 172 if (fpm_status_uri && !strcmp(fpm_status_uri, SG(request_info).request_uri)) { in fpm_status_handle_request() 190 SG(sapi_headers).http_response_code = 500; in fpm_status_handle_request() 201 SG(sapi_headers).http_response_code = 500; in fpm_status_handle_request() 212 SG(sapi_headers).http_response_code = 200; in fpm_status_handle_request() 215 if (SG(request_info).headers_only) { in fpm_status_handle_request()
|
H A D | fpm_log.c | 237 char *env = fcgi_getenv((fcgi_request*) SG(server_context), format, strlen(format)); in fpm_log_write() 301 sapi_headers_struct *sapi_headers = &SG(sapi_headers); in fpm_log_write() 380 len2 = snprintf(b, FPM_LOG_BUFFER - len, "%d", SG(sapi_headers).http_response_code); in fpm_log_write()
|
/PHP-8.1/sapi/cgi/ |
H A D | cgi_main.c | 480 assert(SG(request_info).content_length >= SG(read_post_bytes)); in sapi_cgi_read_post() 482 remaining_bytes = (size_t)(SG(request_info).content_length - SG(read_post_bytes)); in sapi_cgi_read_post() 507 size_t remaining = SG(request_info).content_length - SG(read_post_bytes); in sapi_fcgi_read_post() 745 php_self = SG(request_info).request_uri ? SG(request_info).request_uri : ""; in sapi_cgi_register_variables() 953 if (SG(sapi_started)) { 2267 SG(headers_sent) = 1; 2399 if (SG(request_info).path_translated) efree(SG(request_info).path_translated); 2408 if (SG(request_info).path_translated) efree(SG(request_info).path_translated); 2416 SG(headers_sent) = 1; 2465 SG(headers_sent) = 1; [all …]
|
/PHP-8.1/sapi/apache2handler/ |
H A D | sapi_apache2.c | 76 ctx = SG(server_context); in ZEND_TSRMLS_CACHE_DEFINE() 92 ctx = SG(server_context); in php_apache_sapi_header_handler() 151 php_struct *ctx = SG(server_context); in php_apache_sapi_send_headers() 182 php_struct *ctx = SG(server_context); in php_apache_sapi_read_post() 218 php_struct *ctx = SG(server_context); in php_apache_sapi_get_stat() 241 php_struct *ctx = SG(server_context); in php_apache_sapi_read_cookies() 253 php_struct *ctx = SG(server_context); in php_apache_sapi_getenv() 306 SG(headers_sent) = 1; in php_apache_sapi_flush() 318 ctx = SG(server_context); in php_apache_sapi_log_message() 597 ctx = SG(server_context); in php_handler() [all …]
|
H A D | php_functions.c | 64 php_struct *ctx = SG(server_context); in php_apache_lookup_uri() 186 ctx = SG(server_context); in PHP_FUNCTION() 209 ctx = SG(server_context); in PHP_FUNCTION() 231 ctx = SG(server_context); in PHP_FUNCTION() 264 ctx = SG(server_context); in PHP_FUNCTION() 299 ctx = SG(server_context); in PHP_FUNCTION() 368 server_rec *serv = ((php_struct *) SG(server_context))->r->server; in PHP_MINFO_FUNCTION() 436 …const apr_array_header_t *arr = apr_table_elts(((php_struct *) SG(server_context))->r->subprocess_… in PHP_MINFO_FUNCTION() 454 php_info_print_table_row(2, "HTTP Request", ((php_struct *) SG(server_context))->r->the_request); in PHP_MINFO_FUNCTION() 456 arr = apr_table_elts(((php_struct *) SG(server_context))->r->headers_in); in PHP_MINFO_FUNCTION() [all …]
|
/PHP-8.1/sapi/litespeed/ |
H A D | lsapi_main.c | 177 if ( SG(request_info).path_translated ) { in sapi_lsapi_deactivate() 179 SG(request_info).path_translated = NULL; in sapi_lsapi_deactivate() 264 if ( (SG(request_info).request_uri ) ) in sapi_lsapi_register_variables() 373 if (SG(request_info).no_headers == 1) { in sapi_lsapi_send_headers_like_cgi() 548 if (!SG(request_info).path_translated) { in sapi_lsapi_activate() 640 SG(sapi_headers).http_response_code = 200; in init_request_info() 1118 SG(server_context) = (void *) 1; in processReq() 1242 SG(server_context) = (void *) 1; in cli_main() 1246 SG(options) |= SAPI_OPTION_NO_CHDIR; in cli_main() 1501 SG(request_info).path_translated = NULL; in main() [all …]
|
/PHP-8.1/sapi/embed/ |
H A D | php_embed.c | 238 SG(options) |= SAPI_OPTION_NO_CHDIR; in php_embed_init() 240 SG(request_info).argc=argc; in php_embed_init() 241 SG(request_info).argv=argv; in php_embed_init() 249 SG(headers_sent) = 1; in php_embed_init() 250 SG(request_info).no_headers = 1; in php_embed_init()
|
/PHP-8.1/ext/standard/ |
H A D | head.c | 72 if (sapi_send_headers()==FAILURE || SG(request_info).headers_only) { in php_header() 308 if (SG(headers_sent)) { in PHP_FUNCTION() 326 if (SG(headers_sent)) { in PHP_FUNCTION() 351 …zend_llist_apply_with_argument(&SG(sapi_headers).headers, php_head_apply_header_list_to_hash, retu… in PHP_FUNCTION() 369 old_response_code = SG(sapi_headers).http_response_code; in PHP_FUNCTION() 370 SG(sapi_headers).http_response_code = (int)response_code; in PHP_FUNCTION() 379 if (!SG(sapi_headers).http_response_code) { in PHP_FUNCTION() 383 RETURN_LONG(SG(sapi_headers).http_response_code); in PHP_FUNCTION()
|
H A D | php_fopen_wrapper.c | 81 if (!SG(post_read) && SG(read_post_bytes) < (int64_t)(input->position + count)) { in php_stream_input_read() 228 if ((input->body = SG(request_info).request_body)) { in php_stream_url_wrap_php() 232 SG(request_info).request_body = input->body; in php_stream_url_wrap_php()
|
/PHP-8.1/ext/session/tests/ |
H A D | bug74514.phpt | 13 but it still uses SG(headers_sent). 15 CLI works as Web server, so SG(headers_sent) cannot be ignored nor changed.
|
/PHP-8.1/sapi/fuzzer/ |
H A D | fuzzer-sapi.c | 237 SG(options) |= SAPI_OPTION_NO_CHDIR; in fuzzer_do_request_from_buffer() 238 SG(request_info).argc=0; in fuzzer_do_request_from_buffer() 239 SG(request_info).argv=NULL; in fuzzer_do_request_from_buffer()
|
/PHP-8.1/sapi/cli/ |
H A D | php_cli_server.c | 411 client = SG(server_context); in PHP_FUNCTION() 541 if (!SG(headers_sent)) { in sapi_cli_server_flush() 543 SG(headers_sent) = 1; in sapi_cli_server_flush() 563 if (SG(sapi_headers).http_status_line) { in sapi_cli_server_send_headers() 697 if (SG(request_info).path_translated) { in sapi_cli_server_register_variables() 2158 SG(server_context) = NULL; in php_cli_server_request_shutdown() 2159 SG(rfc1867_uploaded_files) = NULL; in php_cli_server_request_shutdown() 2207 SG(server_context) = client; in php_cli_server_dispatch() 2248 SG(rfc1867_uploaded_files) = NULL; in php_cli_server_dispatch() 2253 SG(server_context) = NULL; in php_cli_server_dispatch() [all …]
|
H A D | php_cli.c | 374 if(SG(request_info).argv0) { in sapi_cli_deactivate() 375 free(SG(request_info).argv0); in sapi_cli_deactivate() 376 SG(request_info).argv0 = NULL; in sapi_cli_deactivate() 685 SG(options) |= SAPI_OPTION_NO_CHDIR; in do_cli() 924 SG(request_info).argc=argc-php_optind+1; in do_cli() 927 SG(request_info).path_translated = translated_path ? translated_path : php_self; in do_cli() 929 SG(request_info).argv=argv+php_optind-1; in do_cli()
|
/PHP-8.1/ext/mbstring/ |
H A D | mb_gpc.c | 85 c_var = SG(request_info).query_string; in ZEND_EXTERN_MODULE_GLOBALS() 92 c_var = SG(request_info).cookie_data; in ZEND_EXTERN_MODULE_GLOBALS() 361 php_stream_rewind(SG(request_info).request_body); in SAPI_POST_HANDLER_FUNC() 362 post_data_str = php_stream_copy_to_mem(SG(request_info).request_body, PHP_STREAM_COPY_ALL, 0); in SAPI_POST_HANDLER_FUNC()
|
/PHP-8.1/sapi/phpdbg/ |
H A D | phpdbg.c | 214 if (SG(request_info).argv0) { in PHP_MSHUTDOWN_FUNCTION() 215 free(SG(request_info).argv0); in PHP_MSHUTDOWN_FUNCTION() 216 SG(request_info).argv0 = NULL; in PHP_MSHUTDOWN_FUNCTION() 1480 if (SG(sapi_headers).mimetype) { in main() 1481 efree(SG(sapi_headers).mimetype); in main() 1482 SG(sapi_headers).mimetype = NULL; in main() 1491 SG(request_info).argv = emalloc(SG(request_info).argc * sizeof(char *)); in main() 1492 for (i = SG(request_info).argc; --i;) { in main() 1687 for (i = SG(request_info).argc; i--;) { in main() 1688 efree(SG(request_info).argv[i]); in main() [all …]
|
/PHP-8.1/ext/session/ |
H A D | session.c | 1152 path = SG(request_info).path_translated; in last_modified() 1231 if (SG(headers_sent)) { in php_session_cache_limiter() 1266 zend_llist *l = &SG(sapi_headers).headers; in php_session_remove_cookie() 1308 if (SG(headers_sent)) { in php_session_send_cookie() 1691 if (SG(headers_sent)) { in PHP_FUNCTION() 1864 if (name && SG(headers_sent)) { in PHP_FUNCTION() 1894 if (name && SG(headers_sent)) { in PHP_FUNCTION() 1935 if (SG(headers_sent)) { in save_handler_check_session() 2121 if (name && SG(headers_sent)) { in PHP_FUNCTION() 2193 if (SG(headers_sent)) { in PHP_FUNCTION() [all …]
|