X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_misc.h;h=a4f579d76c6e245b888fc838d0c551c5dd7f96de;hp=8e901da3c135e546ebb8f7b6bb239be6756c8a92;hb=931511ad28e5fe859014fe099b215db2c9e34277;hpb=b54d9ed0b0cd930f76754fe281e66f36a953085b diff --git a/php_http_misc.h b/php_http_misc.h index 8e901da..a4f579d 100644 --- a/php_http_misc.h +++ b/php_http_misc.h @@ -27,6 +27,9 @@ /* send buffer size */ #define PHP_HTTP_SENDBUF_SIZE 40960 +/* allowed characters of header field names */ +#define PHP_HTTP_HEADER_NAME_CHARS "!#$%&'*+-.^_`|~1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + /* SLEEP */ #define PHP_HTTP_DIFFSEC (0.001) @@ -151,6 +154,15 @@ static inline const char *php_http_locate_bin_eol(const char *bin, size_t len, i # define PHP_HTTP_ZEND_LITERAL_CCN , NULL #endif +#if PHP_VERSION_ID < 50500 +#undef SUCCESS +#undef FAILURE +typedef enum { + SUCCESS = 0, + FAILURE = -1 +} ZEND_RESULT_CODE; +#endif + #if PHP_VERSION_ID < 50700 # define z_is_true zend_is_true #else @@ -197,7 +209,7 @@ static inline zval *php_http_zsep(zend_bool add_ref, int type, zval *z) } } -static inline STATUS php_http_ini_entry(const char *name_str, size_t name_len, const char **value_str, size_t *value_len, zend_bool orig TSRMLS_DC) +static inline ZEND_RESULT_CODE php_http_ini_entry(const char *name_str, size_t name_len, const char **value_str, size_t *value_len, zend_bool orig TSRMLS_DC) { zend_ini_entry *ini_entry;