Re: [SOAP] [FIX] WSDL over https

From: Date: Tue, 15 Jul 2003 02:41:49 +0000
Subject: Re: [SOAP] [FIX] WSDL over https
References: 1 2  Groups: php.soap php.soap 
Request: Send a blank email to php-soap+get-795@lists.php.net to get a copy of this message
Actually, that regular expression is incorrect. It treats WSDL's at plain HTTP URLs as local files. The correct regular expression should be: ^(https?|file):\/\/ I don't know how to use diff and patch, but the line:
            if (!preg_match('/^(http[s]|file):\/\//',$wsdl_fname)) {
Should be replaced with:
            if (!preg_match('/^(https?|file):\/\//',$wsdl_fname)) {
I drove myself crazy for about 4 hours this evening until I looked at that regular expression. The previously submitted patch would require the URL to start with https:// or file:// to be treated as a non-local file. My change also accepts http:// as a remote file. == Will Green Sagi Bashari wrote:
Sorry, here's the correct version:
--- WSDL.php.orig       2003-06-12 10:55:01.000000000 +0300
+++ WSDL.php    2003-06-12 10:55:23.000000000 +0300
@@ -672,7 +672,7 @@
        if (!$md5_wsdl) {
            // is it a local file?
            // this section should be replace by curl at some point
-            if (!preg_match('/^(http|file):\/\//',$wsdl_fname)) {
+            if (!preg_match('/^(http[s]|file):\/\//',$wsdl_fname)) {
                if (!file_exists($wsdl_fname)) {
                    return $this->_raiseSoapFault("Unable to read local WSDL $wsdl_fname", $wsdl_fname);
                }
On 12/06/2003 10:52, Sagi Bashari wrote:
Hi, There's a bug in the current SOAP package that treats WSDL over HTTPS as local files. Here's a fix:
--- WSDL.php.orig       2003-06-12 10:46:45.000000000 +0300
+++ WSDL.php    2003-06-12 10:46:52.000000000 +0300
@@ -672,7 +672,7 @@
        if (!$md5_wsdl) {
            // is it a local file?
            // this section should be replace by curl at some point
-            if (!preg_match('/^(http[s]|file):\/\//',$wsdl_fname)) {
+            if (!preg_match('/^(http|file):\/\//',$wsdl_fname)) {
                if (!file_exists($wsdl_fname)) {
                    return $this->_raiseSoapFault("Unable to read local WSDL $wsdl_fname", $wsdl_fname);
                }
Sagi


« previous php.soap (#795) next »