HTTP_Request not making HTTPS requests

From: Date: Sun, 08 Aug 2004 13:02:24 +0000
Subject: HTTP_Request not making HTTPS requests
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14001@lists.php.net to get a copy of this message
HI all I'm having problems making an https request using PEAR's HTTP_Request. I have ssl support built in (--with-ssl) and I'm pointing a request at https://mysite.com:443/?action..etc however I still get "Bad Request" errors. I have also tried doing this without specifying the port no (443). The code I'm using looks something like this: $location=$toolkit_method."://".$toolkit_server.":443/"; // set up the request $action="?action=context.new&u=christo&p=xxxxx"; $request=$location.$action; $req = &new HTTP_Request($requiest); $req->setMethod(HTTP_REQUEST_METHOD_GET); $req->sendRequest(); $res = $req-> sendRequest(); echo "res is $res"; if (PEAR::isError($res)) { die($res-> getMessage()); } $response = $req->getResponseBody(); The returned error looks kinda like this: ----- Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: https://mysite.com:443/ ________________________________________________________________________ Apache/1.3.31 Server at mysite.com Port 443 ----- I have googled and searched the list archives and looked at the HTTP/Request.php sources, but can't figure out why this isn't working. Anybody got any ideas? Many thanks christo

« previous php.pear.general (#14001) next »