/* 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)
/* STRING UTILITIES */
-#ifndef STR_SET
-# define STR_SET(STR, SET) \
+#ifndef PTR_SET
+# define PTR_SET(STR, SET) \
{ \
- STR_FREE(STR); \
+ PTR_FREE(STR); \
STR = SET; \
}
#endif
# define PHP_HTTP_ZEND_LITERAL_CCN , NULL
#endif
+#if PHP_VERSION_ID < 50500
+typedef enum {
+ SUCCESS = 0,
+ FAILURE = -1
+} ZEND_RESULT_CODE;
+#endif
+
#if PHP_VERSION_ID < 50700
# define z_is_true zend_is_true
#else
}
}
-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;
static inline void php_http_array_hashkey_stringfree(php_http_array_hashkey_t *key)
{
if (key->type != HASH_KEY_IS_STRING || key->dup) {
- STR_FREE(key->str);
+ PTR_FREE(key->str);
}
}