ensure options are applied before the headers are set
[m6w6/ext-http] / php_http_negotiate.c
index 2352e672a6dec40b31fb1497c3ec97ac9994fc5c..a74875b7378647664a1fe35a63b72c8f17995d79 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2014, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -99,7 +99,7 @@ static int php_http_negotiate_reduce(void *p TSRMLS_DC, int num_args, va_list ar
        return ZEND_HASH_APPLY_KEEP;
 }
 
-PHP_HTTP_API HashTable *php_http_negotiate(const char *value_str, size_t value_len, HashTable *supported, const char *primary_sep_str, size_t primary_sep_len TSRMLS_DC)
+HashTable *php_http_negotiate(const char *value_str, size_t value_len, HashTable *supported, const char *primary_sep_str, size_t primary_sep_len TSRMLS_DC)
 {
        HashTable *result = NULL;
 
@@ -141,7 +141,7 @@ PHP_HTTP_API HashTable *php_http_negotiate(const char *value_str, size_t value_l
                                add_index_double(&arr, key.num, q);
                        }
 
-                       STR_FREE(key.str);
+                       PTR_FREE(key.str);
                }
 
 #if 0