diff options
author | Jakub Zelenka <bukka@php.net> | 2015-01-12 09:02:17 +0000 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2015-01-12 09:02:17 +0000 |
commit | b3823f5cab4e405b767cd8dddebb54b1c29bd2a8 (patch) | |
tree | e42fbf615d62213c1e744b8a909155e8f2cdaa87 /ext/soap/php_http.c | |
parent | e6fb493e5dbafdad37ba5334c986636342b5d9aa (diff) | |
parent | 31817447cc06093368f022086340ad3f6f616528 (diff) | |
download | php-git-b3823f5cab4e405b767cd8dddebb54b1c29bd2a8.tar.gz |
Merge branch 'master' into jsond
Conflicts:
ext/json/JSON_parser.c
ext/json/JSON_parser.h
ext/json/json.c
ext/json/utf8_decode.c
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 38db62ca98..20bd046327 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -367,7 +367,7 @@ int make_http_soap_request(zval *this_ptr, int kind = Z_LVAL_P(tmp) & SOAP_COMPRESSION_DEFLATE; if (level > 9) {level = 9;} - + if ((Z_LVAL_P(tmp) & SOAP_COMPRESSION_ACCEPT) != 0) { smart_str_append_const(&soap_headers_z,"Accept-Encoding: gzip, deflate\r\n"); } @@ -424,7 +424,7 @@ int make_http_soap_request(zval *this_ptr, context = php_stream_context_from_zval(tmp, 0); } - if (context && + if (context && (tmp = php_stream_context_get_option(context, "http", "max_redirects")) != NULL) { if (Z_TYPE_P(tmp) != IS_STRING || !is_numeric_string(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), &redirect_max, NULL, 1)) { if (Z_TYPE_P(tmp) == IS_LONG) @@ -522,7 +522,7 @@ try_again: add_property_resource(this_ptr, "httpurl", ret); /*zend_list_addref(ret);*/ - if (context && + if (context && (tmp = php_stream_context_get_option(context, "http", "protocol_version")) != NULL && Z_TYPE_P(tmp) == IS_DOUBLE && Z_DVAL_P(tmp) == 1.0) { @@ -579,7 +579,7 @@ try_again: smart_str_appendl(&soap_headers, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); smart_str_append_const(&soap_headers, "\r\n"); } - } else if (context && + } else if (context && (tmp = php_stream_context_get_option(context, "http", "user_agent")) != NULL && Z_TYPE_P(tmp) == IS_STRING) { if (Z_STRLEN_P(tmp) > 0) { @@ -721,7 +721,7 @@ try_again: PHP_MD5Update(&md5ctx, (unsigned char*)HA2, 32); PHP_MD5Final(hash, &md5ctx); make_digest(response, hash); - + smart_str_append_const(&soap_headers, "Authorization: Digest username=\""); smart_str_appendl(&soap_headers, Z_STRVAL_P(login), Z_STRLEN_P(login)); if ((tmp = zend_hash_str_find(Z_ARRVAL_P(digest), "realm", sizeof("realm")-1)) != NULL && @@ -739,7 +739,7 @@ try_again: smart_str_appends(&soap_headers, phpurl->path); } else { smart_str_appendc(&soap_headers, '/'); - } + } if (phpurl->query) { smart_str_appendc(&soap_headers, '?'); smart_str_appends(&soap_headers, phpurl->query); @@ -1042,7 +1042,7 @@ try_again: efree(connection); } } - } + } if (!get_http_body(stream, http_close, http_headers->val, &http_body, &http_body_size)) { if (request != buf) {efree(request);} @@ -1093,7 +1093,7 @@ try_again: strcat(s, new_url->path); efree(new_url->path); new_url->path = s; - } + } } else { char *s = emalloc(strlen(new_url->path) + 2); s[0] = '/'; s[1] = 0; |