Lines Matching refs:sapi_headers
391 zend_llist_init(&SG(sapi_headers).headers, sizeof(sapi_header_struct), in sapi_activate_headers_only()
393 SG(sapi_headers).send_default_content_type = 1; in sapi_activate_headers_only()
396 SG(sapi_headers).http_status_line = NULL; in sapi_activate_headers_only()
397 SG(sapi_headers).mimetype = NULL; in sapi_activate_headers_only()
432 …zend_llist_init(&SG(sapi_headers).headers, sizeof(sapi_header_struct), (void (*)(void *)) sapi_fre… in sapi_activate()
433 SG(sapi_headers).send_default_content_type = 1; in sapi_activate()
438 SG(sapi_headers).http_status_line = NULL; in sapi_activate()
439 SG(sapi_headers).mimetype = NULL; in sapi_activate()
488 if (SG(sapi_headers).http_status_line) { in sapi_send_headers_free()
489 efree(SG(sapi_headers).http_status_line); in sapi_send_headers_free()
490 SG(sapi_headers).http_status_line = NULL; in sapi_send_headers_free()
496 zend_llist_destroy(&SG(sapi_headers).headers); in sapi_deactivate_module()
538 if (SG(sapi_headers).mimetype) { in sapi_deactivate_destroy()
539 efree(SG(sapi_headers).mimetype); in sapi_deactivate_destroy()
540 SG(sapi_headers).mimetype = NULL; in sapi_deactivate_destroy()
585 if (SG(sapi_headers).http_response_code == ncode) { in sapi_update_response_code()
589 if (SG(sapi_headers).http_status_line) { in sapi_update_response_code()
590 efree(SG(sapi_headers).http_status_line); in sapi_update_response_code()
591 SG(sapi_headers).http_status_line = NULL; in sapi_update_response_code()
593 SG(sapi_headers).http_response_code = ncode; in sapi_update_response_code()
648 (SAPI_HEADER_ADD & sapi_module.header_handler(sapi_header, op, &SG(sapi_headers)))) { in sapi_header_add_op()
656 … sapi_remove_header(&SG(sapi_headers).headers, sapi_header->header, strlen(sapi_header->header)); in sapi_header_add_op()
660 zend_llist_add_element(&SG(sapi_headers).headers, (void *) sapi_header); in sapi_header_add_op()
708 sapi_module.header_handler(&sapi_header, op, &SG(sapi_headers)); in sapi_header_op()
710 zend_llist_clean(&SG(sapi_headers).headers); in sapi_header_op()
734 sapi_module.header_handler(&sapi_header, op, &SG(sapi_headers)); in sapi_header_op()
736 sapi_remove_header(&SG(sapi_headers).headers, header_line, header_line_len); in sapi_header_op()
767 if (SG(sapi_headers).http_status_line) { in sapi_header_op()
768 efree(SG(sapi_headers).http_status_line); in sapi_header_op()
770 SG(sapi_headers).http_status_line = header_line; in sapi_header_op()
786 if (!SG(sapi_headers).mimetype){ in sapi_header_op()
787 SG(sapi_headers).mimetype = estrdup(mimetype); in sapi_header_op()
800 SG(sapi_headers).send_default_content_type = 0; in sapi_header_op()
812 if ((SG(sapi_headers).http_response_code < 300 || in sapi_header_op()
813 SG(sapi_headers).http_response_code > 399) && in sapi_header_op()
814 SG(sapi_headers).http_response_code != 201) { in sapi_header_op()
855 if (SG(sapi_headers).send_default_content_type && sapi_module.send_headers) { in sapi_send_headers()
862 SG(sapi_headers).mimetype = default_mimetype; in sapi_send_headers()
868 memcpy(default_header.header + sizeof("Content-type: ") - 1, SG(sapi_headers).mimetype, len + 1); in sapi_send_headers()
874 SG(sapi_headers).send_default_content_type = 0; in sapi_send_headers()
888 retval = sapi_module.send_headers(&SG(sapi_headers)); in sapi_send_headers()
901 if (SG(sapi_headers).http_status_line) { in sapi_send_headers()
902 http_status_line.header = SG(sapi_headers).http_status_line; in sapi_send_headers()
903 http_status_line.header_len = (uint32_t)strlen(SG(sapi_headers).http_status_line); in sapi_send_headers()
906 …http_status_line.header_len = slprintf(buf, sizeof(buf), "HTTP/1.0 %d X", SG(sapi_headers).http_re… in sapi_send_headers()
910 …zend_llist_apply_with_argument(&SG(sapi_headers).headers, (llist_apply_with_arg_func_t) sapi_modul… in sapi_send_headers()
911 if(SG(sapi_headers).send_default_content_type) { in sapi_send_headers()