unfold url tests
[m6w6/ext-http] / php_http_misc.c
index 0ba19f9b0ee908ea27e7de64bcf3766f6db7a1fa..03b9560483c92198c74de9baec824262c3c05048 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2013, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2014, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -61,7 +61,8 @@ int php_http_match(const char *haystack_str, const char *needle_str, int flags)
                        result = !strcasecmp(haystack_str, needle_str);
                }
        } else {
-               char *found, *haystack = estrdup(haystack_str), *needle = estrdup(needle_str);
+               const char *found;
+               char *haystack = estrdup(haystack_str), *needle = estrdup(needle_str);
 
                if (flags & PHP_HTTP_MATCH_CASE) {
                        found = zend_memnstr(haystack, needle, strlen(needle), haystack+strlen(haystack));