ZF-4835: Zend_Soap_Autodiscover should use REQUEST_URI instead of SCRIPT_NAME
Description
Zend_Soap_Autodiscover tries to automatically discover the correct script URI. While when configuring rewrite-rules in your Apache config there is no difference between REQUEST_URI and SCRIPT_NAME in PHP, this changes when you are going to use .htaccess files. Here a short overview of related $_SERVER variables in different environments when rewrite is in use (in this example /index/test -> /index.php):
Rewrite rules in Apache conf:
[REQUEST_URI] => /index/test [SCRIPT_NAME] => /index/test [PHP_SELF] => /index/test
Rewrite rules in .htaccess file:
[REQUEST_URI] => /index/test [SCRIPT_NAME] => /index.php [PHP_SELF] => /index.php/test
In my opinion the only correct URI for Autodiscover is REQUEST_URI.
Best regards, Thomas Gelf
Comments
Posted by Thomas Gelf (tgelf) on 2008-11-06T11:12:53.000+0000
Attaching patch changing SCRIPT_NAME to REQUEST_URI
Posted by Benjamin Eberlei (beberlei) on 2008-11-07T00:22:44.000+0000
AutoDiscover now uses REQUEST_URI without the parameters after the ?. This way you can still provide the WSDL via Autodiscovering on script.php?wsdl and the uri is autodiscovered to be script.php (where the SOAP Server resides).
Additionally to this behaviour AutoDiscover did not detect automatically the path for non apache webservers. This was fixed too.
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:13.000+0000
Changing issues in preparation for the 1.7.0 release.