[bug] SessionID is not send as a cookie
You need to be logged in to post messages in the forums. New users may register here.
|
Damien Pitard
Member since: 09 January 2008
Posts: 19
|
Friday 07 August 2009 3:47:10 pm
Hi Vidar,
$this->SessionID is not added to the curl request if no post data are set.
Here's a patch fixing that :
Index: extension/ezrest/classes/ezrestclient.php
===================================================================
--- extension/ezrest/classes/ezrestclient.php (revision 12)
+++ extension/ezrest/classes/ezrestclient.php (working copy)
@@ -125,12 +125,13 @@
{
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postData );
- if ( $this->SessionID )
- {
- curl_setopt( $ch, CURLOPT_HTTPHEADER, array ( 'Cookie: ' . $this->SessionID ) );
- }
}
+ if ( $this->SessionID )
+ {
+ curl_setopt( $ch, CURLOPT_HTTPHEADER, array ( 'Cookie: ' . $this->SessionID ) );
+ }
+
$data = curl_exec( $ch );
$errNo = curl_errno( $ch );
if ( $errNo )
|
|
You need to be logged in to post messages in the forums. New users may register here.