in reply to Re: HTTPS Call across proxy server
in thread HTTPS Call across proxy server

Hi Hossman,

I know that the request was successful that is why I got status code 200. I want to get the content so that I can parse the same. I will show the alternative to this one that I wrote using Win32::OLE. This uses msxml2.serverxmlhttp.


sub GetContent{ my($lstrURL)=@_; $testURL=Variant(VT_BSTR,$lstrURL); my $lobjXML=Win32::OLE->new('MSXML2.ServerXMLHTTP'); #my $lobjXML=Win32::OLE->new('WinHttp.WinHttpRequest.5.1') or die "can +not create: $!"; $lobjXML->open("GET",$testURL,false); #$lobjXML->SetClientCertificate("Enterprise Trust\\Local Computer"); $lobjXML->send; #print $lobjXML->GetALLResponseHeaders; if($lobjXML->status==200){ #print $lobjXML->Status ,"\n"; return $lobjXML->ResponseText; } else{ return $lobjXML->status,"\n"; #print $lobjXML->ResponseText; } undef $lobjXML; }

This piece of code works fine and fetches content. But I cannot port this on a linux box. That is why I want the whole thing to work using LWP. My requirement is to parse the content which I get as response to HTTPS request. Thanks a lot for the response.
Regards,
Binu

Replies are listed 'Best First'.
Re: Re: Re: HTTPS Call across proxy server
by hossman (Prior) on Dec 13, 2002 at 22:35 UTC

    I think you're missing my point.

    The fact that you are getting a response back, with a body, means that your client code is working. If you aren't getting the content you expect, that's probably not a problem with your client code. What you need to figure out, is why the server/proxy might be treating your LWP client differently from your Win32::OLE client.

    One posibility allready discussed is the GET vs. POST issue. Another is the proxy ... I don't know much about Win32::OLE, but I don't see anything in your second version that makes it look like it's using a proxy. There's also the issue of the User Agent, the server (or the proxy) could be responding differently based on the User Agent header ... or for that matter, any header.