projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
add some more tests; fix leak in php_http_env_get_response_header(); honor content...
[m6w6/ext-http]
/
php_http_misc.c
diff --git
a/php_http_misc.c
b/php_http_misc.c
index 4df85cfee6b3f421c9e53009bf5a64de502d6839..e4411e0aaf39efb2e654e46913d8287ec0beb001 100644
(file)
--- a/
php_http_misc.c
+++ b/
php_http_misc.c
@@
-13,7
+13,6
@@
#include "php_http_api.h"
#include <ext/standard/php_lcg.h>
#include "php_http_api.h"
#include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
#include <zend_exceptions.h>
/* SLEEP */
#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;
{
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);
if (flags & PHP_HTTP_MATCH_FULL) {
if (flags & PHP_HTTP_MATCH_CASE) {
result = !strcmp(haystack_str, needle_str);