php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60676
Patch php-soap-proxy-patch revision 2012-01-07 02:20 UTC by samm at os2 dot kiev dot ua

Patch php-soap-proxy-patch for SOAP related Bug #60676

Patch version 2012-01-07 02:20 UTC

Return to Bug #60676 | Download this patch
Patch Revisions:

Developer: samm@os2.kiev.ua

diff -u php_soap.h.old php_soap.h
--- ext/soap/php_soap.h	2011-01-01 02:19:59.000000000 +0000
+++ ext/soap/php_soap.h	2012-01-07 00:57:56.000000000 +0000
@@ -166,6 +166,10 @@
 	char*      cache_dir;
 	long       cache_ttl;
 	long       cache_limit;
+	char*      proxy_host;
+	long       proxy_port;
+	char*      proxy_login;
+	char*      proxy_password;
 	HashTable *mem_cache;
 	xmlCharEncodingHandlerPtr encoding;
 	HashTable *class_map;
diff -u soap.c.old soap.c
--- ext/soap/soap.c	2012-01-07 02:01:10.220455037 +0000
+++ ext/soap/soap.c	2012-01-07 01:54:16.000000000 +0000
@@ -586,6 +586,14 @@
                   cache_mode, zend_soap_globals, soap_globals)
 STD_PHP_INI_ENTRY("soap.wsdl_cache_limit",       "5", PHP_INI_ALL, OnUpdateLong,
                   cache_limit, zend_soap_globals, soap_globals)
+STD_PHP_INI_ENTRY("soap.proxy_host",         "", PHP_INI_ALL, OnUpdateString,
+                  proxy_host, zend_soap_globals, soap_globals)
+STD_PHP_INI_ENTRY("soap.proxy_port",         "0", PHP_INI_ALL, OnUpdateLong,
+                  proxy_port, zend_soap_globals, soap_globals)
+STD_PHP_INI_ENTRY("soap.proxy_login",         "", PHP_INI_ALL, OnUpdateString,
+                  proxy_login, zend_soap_globals, soap_globals)
+STD_PHP_INI_ENTRY("soap.proxy_password",         "", PHP_INI_ALL, OnUpdateString,
+                  proxy_password, zend_soap_globals, soap_globals)
 PHP_INI_END()
 
 static HashTable defEnc, defEncIndex, defEncNs;
@@ -2502,6 +2510,14 @@
 	}
 
 	cache_wsdl = SOAP_GLOBAL(cache);
+	if(strlen(SOAP_GLOBAL(proxy_host))) {
+	    add_property_stringl(this_ptr, "_proxy_host", SOAP_GLOBAL(proxy_host), strlen(SOAP_GLOBAL(proxy_host)), 1);
+	    add_property_long(this_ptr, "_proxy_port", SOAP_GLOBAL(proxy_port));
+	    if(strlen(SOAP_GLOBAL(proxy_login)))
+		add_property_stringl(this_ptr, "_proxy_login", SOAP_GLOBAL(proxy_login), strlen(SOAP_GLOBAL(proxy_login)), 1);
+	    if(strlen(SOAP_GLOBAL(proxy_password)))
+		add_property_stringl(this_ptr, "_proxy_password", SOAP_GLOBAL(proxy_password), strlen(SOAP_GLOBAL(proxy_password)), 1);
+	}
 
 	if (options != NULL) {
 		HashTable *ht = Z_ARRVAL_P(options);
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 25 04:01:31 2021 UTC