back to dev
[m6w6/ext-http] / php_http_misc.h
index 3bd77d8b931046006373445f7344476a7bd2a1b9..cf00f24ef5a71e3d3b21c1a8e0283f2c439e8b97 100644 (file)
@@ -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)
@@ -41,10 +44,10 @@ PHP_HTTP_API void php_http_sleep(double s);
 
 /* 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
@@ -291,7 +294,7 @@ static inline void php_http_array_hashkey_stringify(php_http_array_hashkey_t *ke
 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);
        }
 }