summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2021-03-17 11:23:02 +0000
committerGeorge Peter Banyard <girgias@php.net>2021-03-17 16:36:16 +0000
commit84e12626e7f6efb94f028b71762442e80a5c0363 (patch)
tree5a357b1f600a0bc8702ab920a0cfd744f25bea5d
parentddfe269aa8d29e3d343c78930eee9c02a4487fbd (diff)
downloadphp-git-84e12626e7f6efb94f028b71762442e80a5c0363.tar.gz
Use zend_string_equals() API instead of strcmp() in SOAP extension
-rw-r--r--ext/soap/php_http.c2
-rw-r--r--ext/soap/soap.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index b14c8cc1a1..9119fee9a7 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -491,7 +491,7 @@ try_again:
(((use_ssl && orig->scheme != NULL && zend_string_equals_literal(orig->scheme, "https")) ||
(!use_ssl && orig->scheme == NULL) ||
(!use_ssl && !zend_string_equals_literal(orig->scheme, "https"))) &&
- strcmp(ZSTR_VAL(orig->host), ZSTR_VAL(phpurl->host)) == 0 &&
+ zend_string_equals(orig->host, phpurl->host) &&
orig->port == phpurl->port))) {
} else {
php_stream_close(stream);
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 49815082a8..b1423bc60a 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1275,9 +1275,9 @@ PHP_METHOD(SoapServer, handle)
(encoding = zend_hash_str_find(Z_ARRVAL_P(server_vars), "HTTP_CONTENT_ENCODING", sizeof("HTTP_CONTENT_ENCODING")-1)) != NULL &&
Z_TYPE_P(encoding) == IS_STRING) {
- if (strcmp(Z_STRVAL_P(encoding),"gzip") == 0
- || strcmp(Z_STRVAL_P(encoding),"x-gzip") == 0
- || strcmp(Z_STRVAL_P(encoding),"deflate") == 0
+ if (zend_string_equals_literal(Z_STR_P(encoding), "gzip")
+ || zend_string_equals_literal(Z_STR_P(encoding), "x-gzip")
+ || zend_string_equals_literal(Z_STR_P(encoding), "deflate")
) {
zval filter_params;