separate http_env_request; add getQuer(), getPost(), getFiles()
[m6w6/ext-http] / php_http_misc.c
index 4df85cfee6b3f421c9e53009bf5a64de502d6839..e4411e0aaf39efb2e654e46913d8287ec0beb001 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
 #include <zend_exceptions.h>
 
 /* SLEEP */
@@ -51,6 +50,10 @@ int php_http_match(const char *haystack_str, const char *needle_str, int flags)
 {
        int result = 0;
 
+       if (!haystack_str || !needle_str) {
+               return result;
+       }
+
        if (flags & PHP_HTTP_MATCH_FULL) {
                if (flags & PHP_HTTP_MATCH_CASE) {
                        result = !strcmp(haystack_str, needle_str);