X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_api.h;h=42a99e0adff6c013a3f7fd51e8882770fb5c48e3;hp=666c33bd36bbba6a140ebee6fda07f72ed1d1759;hb=a673ef718611fe1a7c8a4c61b2f4c97fc06efc2d;hpb=efad267ce4b49489b03022d7decd94dcf244e71e diff --git a/php_http_api.h b/php_http_api.h index 666c33b..42a99e0 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -19,6 +19,7 @@ #define PHP_HTTP_API_H #include "php_http_std_defs.h" +#include "php_http_send_api.h" #define pretty_key(key, key_len, uctitle, xhyphen) _http_pretty_key(key, key_len, uctitle, xhyphen) extern char *_http_pretty_key(char *key, size_t key_len, zend_bool uctitle, zend_bool xhyphen); @@ -63,6 +64,10 @@ PHP_HTTP_API STATUS _http_get_request_body_ex(char **body, size_t *length, zend_ #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); +#define http_guess_content_type(mf, mm, d, l, m) _http_guess_content_type((mf), (mm), (d), (l), (m) TSRMLS_CC) +PHP_HTTP_API char *_http_guess_content_type(const char *magic_file, long magic_mode, void *data_ptr, size_t data_len, http_send_mode mode TSRMLS_DC); + + #define http_locate_body _http_locate_body static inline const char *_http_locate_body(const char *message) {