- added http_get_request_body()
[m6w6/ext-http] / php_http_api.h
index 1924f96fe290b8197242a587db34b5c3e295d062..472c4b902b7e8559f9f1c691757aa030f4ac8aa9 100644 (file)
@@ -33,7 +33,7 @@ extern STATUS _http_parse_key_list(const char *list, HashTable *items, char sepa
 
 #define http_error(type, code, string) _http_error_ex(type, code, "%s", string)
 #define http_error_ex _http_error_ex
-extern void _http_error_ex(long type, long code, const char *format, ...);
+extern void _http_error_ex(long type, long code, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
 
 #define http_exit(s, h) http_exit_ex((s), (h), 1)
 #define http_exit_ex(s, h, f) _http_exit_ex((s), (h), (f) TSRMLS_CC)
@@ -53,6 +53,10 @@ extern STATUS _http_check_method_ex(const char *method, const char *methods);
 #define http_get_server_var_ex(v, s) _http_get_server_var_ex((v), (s), 0 TSRMLS_CC)
 PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_size, 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_chunked_decode(e, el, d, dl) _http_chunked_decode((e), (el), (d), (dl) TSRMLS_CC)
 PHP_HTTP_API const char *_http_chunked_decode(const char *encoded, size_t encoded_len, char **decoded, size_t *decoded_len TSRMLS_DC);