-#define HTTP_CHECK_HEADERS_SENT(action) \
- if (SG(headers_sent) && !SG(request_info).no_headers) { \
- HTTP_GET_OUTPUT_START(); \
- if (output_start_filename) { \
- http_error_ex(HE_WARNING, HTTP_E_HEADER, "Cannot modify header information - headers already sent by (output started at %s:%d)", \
- output_start_filename, output_start_lineno); \
- } else { \
- http_error(HE_WARNING, HTTP_E_HEADER, "Cannot modify header information - headers already sent"); \
- } \
- action; \
- }
-
-#define http_log(f, i, m) _http_log_ex((f), (i), (m) TSRMLS_CC)
-extern void _http_log_ex(char *file, const char *ident, const char *message TSRMLS_DC);
-
-#define http_exit(s, h) http_exit_ex((s), (h), NULL, 1)
-#define http_exit_ex(s, h, b, e) _http_exit_ex((s), (h), (b), (e) TSRMLS_CC)
-extern STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header TSRMLS_DC);
-
-#define http_check_method(m) http_check_method_ex((m), HTTP_KNOWN_METHODS)
-#define http_check_method_ex(m, a) _http_check_method_ex((m), (a))
-extern STATUS _http_check_method_ex(const char *method, const char *methods);
-
-#define http_got_server_var(v) (NULL != http_get_server_var_ex((v), strlen(v), 1))
-#define http_get_server_var(v, c) http_get_server_var_ex((v), strlen(v), (c))
-#define http_get_server_var_ex(v, l, c) _http_get_server_var_ex((v), (l), (c) TSRMLS_CC)
-PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_len, zend_bool check TSRMLS_DC);
-
-#define http_get_request_body(b, l) _http_get_request_body_ex((b), (l), 1 TSRMLS_CC)
-#define http_get_request_body_ex(b, l, d) _http_get_request_body_ex((b), (l), (d) TSRMLS_CC)
-PHP_HTTP_API STATUS _http_get_request_body_ex(char **body, size_t *length, zend_bool dup TSRMLS_DC);
-
-#define http_get_request_body_stream() _http_get_request_body_stream(TSRMLS_C)
-PHP_HTTP_API php_stream *_http_get_request_body_stream(TSRMLS_D);
-
-
-typedef void (*http_parse_params_callback)(void *cb_arg, const char *key, int keylen, const char *val, int vallen TSRMLS_DC);