com php-src: fix C89 compat: ext/standard/http_fopen_wrappe r.c

From: Date: Mon, 14 Jul 2014 18:27:59 +0000
Subject: com php-src: fix C89 compat: ext/standard/http_fopen_wrappe r.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79471@lists.php.net to get a copy of this message
Commit: 236365a016df0f1976b0f9d063340231eb1fb4c8 Author: Anatol Belski <ab@php.net> Mon, 14 Jul 2014 20:27:59 +0200 Parents: 935bc5795f9191571d46e0c2f65bbfb509c6f3bc Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=236365a016df0f1976b0f9d063340231eb1fb4c8 Log: fix C89 compat Changed paths: M ext/standard/http_fopen_wrapper.c Diff: diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 87d0bd6..1c4b17a 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -224,6 +224,8 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, efree(transport_string); if (stream && use_proxy && use_ssl) { + smart_str header = {0}; + /* Set peer_name or name verification will try to use the proxy server name */ if (!context || php_stream_context_get_option(context, "ssl", "peer_name", &tmpzval) == FAILURE) { MAKE_STD_ZVAL(ssl_proxy_peer_name); @@ -231,8 +233,6 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, php_stream_context_set_option(stream->context, "ssl", "peer_name", ssl_proxy_peer_name); } - smart_str header = {0}; - smart_str_appendl(&header, "CONNECT ", sizeof("CONNECT ")-1); smart_str_appends(&header, resource->host); smart_str_appendc(&header, ':');

« previous php.cvs (#79471) next »