Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#12 HTTPs through Proxies

open
Gene Wood
None
5
2004-07-25
2002-10-18
Carl Shelbourne
No

Snoopy and cUrl do not seem to be able to cope with
HTTPS requests when passed through a proxy.
Although a proxy maybe setup within the public
variables of the class, this setting is ignored when a
https request is made.

The inability to specify a commandline option to cUrl
and difficulties with exporting the environment variables
that cUrl uses for Proxies may make a solution a little
more difficult

Discussion

  • Gene Wood
    Gene Wood
    2004-07-25

    Logged In: YES
    user_id=547273

    So what if we did the following :

    Currently in the _httpsrequest function we've got the
    following :

    for($curr_header = 0; $curr_header < count($headers);
    $curr_header++)
    $cmdline_params .= " -H \"".$headers[$curr_header]."\"";

    if(!empty($body))
    $cmdline_params .= " -d \"$body\"";

    if($this->read_timeout > 0)
    $cmdline_params .= " -m ".$this->read_timeout;

    What if we just added another similar conditional like this :

    //add proxy auth headers
    if(!empty($this->proxy_user))
    $cmdline_params .= " --proxy-basic --proxy-user " .
    base64_encode($this->proxy_user . ':' . $this->proxy_pass);

    I'm basically combining the style of cmdline_params building
    from the _httpsrequest function and the proxy header
    creationg form the _httprequest function.

     
  • Gene Wood
    Gene Wood
    2004-07-25

    Logged In: YES
    user_id=547273

    I don't have access to a proxy to test this.

    Carl,
    Can you test this through your proxy?

     
  • Gene Wood
    Gene Wood
    2004-07-25

    • assigned_to: nobody --> gene_wood