#37054 [Asn->Csd]: SoapClient Error Fetching http headers
| From: | dmitry@php.net | Date: | Thu, 13 Apr 2006 08:21:00 +0000 |
| Subject: | #37054 [Asn->Csd]: SoapClient Error Fetching http headers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95731@lists.php.net to get a copy of this message | ||
ID: 37054
Updated by: dmitry@php.net
Reported By: gijs at d1 dot nl
-Status: Assigned
+Status: Closed
Bug Type: SOAP related
Operating System: Debian 3.1
PHP Version: 5.1.2RC3
Assigned To: dmitry
New Comment:
At first you have typo in WSDL.
"http://www.zoekned.nl/test/server.php:80"
is not a valid URL. But this
is not important.
The bug occurs because of your HTTP server configuration.
For some reason it respond with the following response and SoapClient
redirects to "http://www.sukkel.nl".
HTTP/1.1 302 Found
Date: Thu, 13 Apr 2006 06:54:04 GMT
Server: Apache/1.3.34 (Unix) PHP/5.1.3RC3 mod_ssl/2.8.25 OpenSSL/0.9.7e
FrontPage/5.0.2.2510
Location: http://www.sukkel.nl
Keep-Alive: timeout=5, max=499
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://www.sukkel.nl">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.34 Server at www.zoekned.nl Port 80</ADDRESS>
</BODY></HTML>
Seems this answer occurs because of "User-Agent" reqest header. I
changed default header "PHP-SOAP/php-version" to conform HTTP RFC, but
this didn't help. (BTW SOAP/php-version works fine). Probably your web
server configured to respond with this magic answer to requests from
PHP. :)
To make workaround for such servers, I added ability to change
"User-Agent" HTTP header in HTTP response.
You can do it in SoapClinet constructor:
new SoapClient($wsdl, array("user_agent"=>"some_string"));
empty string ("") will prevent sending of User-Agent server at all.
Fixed in CVS HEAD and PHP_5_0.
Previous Comments:
------------------------------------------------------------------------
[2006-04-12 17:01:38] sniper@php.net
Assigned to the SOAP maintainer.
------------------------------------------------------------------------
[2006-04-12 15:06:13] gijs at d1 dot nl
Sorry, no, it does not run on the latest snapshot.
- Client
http://www.zoekned.nl/test/client.php
- Client Source:
http://www.zoekned.nl/test/client.phps
- Server
http://www.zoekned.nl/test/server.php
- Server Source:
http://www.zoekned.nl/test/server.phps
------------------------------------------------------------------------
[2006-04-12 15:02:27] sniper@php.net
Nice, but does the SOAP thing work now?
------------------------------------------------------------------------
[2006-04-12 15:00:31] gijs at d1 dot nl
Latest CVS snapshot compiled and running!!
http://www.zoekned.nl/phpinfo.php <-- temp file!
------------------------------------------------------------------------
[2006-04-12 12:59:57] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37054
--
Edit this bug report at http://bugs.php.net/?id=37054&edit=1