[Cartoweb-dev] [Bug 2021] New: missing data in $HTTP_RAW_POST_DATA makes soap request fail

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Wed Mar 18 17:41:41 EST 2009


http://bugzilla.maptools.org/show_bug.cgi?id=2021

           Summary: missing data in  $HTTP_RAW_POST_DATA makes soap
                    request fail
           Product: CartoWeb
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core
        AssignedTo: cartoweb-dev at lists.maptools.org
        ReportedBy: devloic at gmail.com


I am calling a SOAP request in javascript using the window.name technique (
http://www.sitepen.com/blog/2008/07/22/windowname-transport/ ) because I want
to make cross domain requests. In this case $HTTP_RAW_POST_DATA doesn't get
populated correctly so I need to set $HTTP_RAW_POST_DATA manually by retrieving 
file_get_contents("php://input") . For some reason I am not aware of when 
SoapXMLCache.printSoapXMLFromServer($soapRequest) gets executed later on
$HTTP_RAW_POST_DATA is empty again and my SOAP request fails.

The printSoapXMLFromServer function receives the $soapRequest parameter but
makes no use of it  :

private function printSoapXMLFromServer($soapRequest) {

        $server = setupSoapService($this->cartoserver);
        ob_start();
        $server->handle();
        $data = ob_get_contents();
    ob_end_flush();

        return $data;
}

$server->handle() uses $HTTP_RAW_POST_DATA by default but it could also use
$soapRequest like this $server->handle($soapRequest) since $soapRequest is set
to $HTTP_RAW_POST_DATA previously. 

This would solve the $HTTP_RAW_POST_DATA scope problem and shouldn't introduce
any regression.

-- 
Configure bugmail: http://bugzilla.maptools.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Cartoweb-dev mailing list