eZSESSID in ezhttptool::sendHTTPRequest()

Author Message

Michael Lee

Sunday 04 November 2007 7:12:19 am

Is it possible to support eZSESSID in ezhttptool::sendHTTPRequest?

Can we add another parameter to sendHTTPRequest() as the following?

function sendHTTPRequest($uri,$port,$postParameters, $userAgent, $passthrough, $ezsessionid)

And change the request header as the following?

...
"Cookie : eZSESSID=$ezsessionid".
...

In this way, we can do internal forward with authenticated session on server side.

Or maybe we can add an array parameter named "$cookies" to allow the user to supply additional cookies when invoking sendHTTPRequest() as the following?

function sendHTTPRequest($uri,$port,$postParameters, $userAgent, $passthrough, $cookies)

Please advise.

Michael Lee | Managing Director | ZerusTech Ltd | www.zerustech.com

Skype: zerustech

Kåre Køhler Høvik

Sunday 04 November 2007 12:55:13 pm

Hi

This is a hack, but if you can add custom HTTP headers using the <i>$userAgent</i> parameter. Example:

$userAgent = 'eZ Publish ' . "\r\n" .
                   'Cookie: ' . $mySessionVar;
eZHTTPTool::sendHTTPRequest( 'http://ez.no', 80, false, $userAgent );

Best regards
Kåre

Kåre Høvik

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.