Remove useless proxyurl handling from cURL HTTP backend

https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
> A proxy host string can also include protocol scheme (http://)
> and embedded user + password.
This commit is contained in:
Louis Sautier 2019-12-20 16:22:45 +01:00
parent 4024692eee
commit e2bd7c21b9
1 changed files with 0 additions and 6 deletions

View File

@ -212,12 +212,6 @@ sub set_proxy {
my ($self, %options) = @_;
if (defined($options{request}->{proxyurl}) && $options{request}->{proxyurl} ne '') {
if ($options{request}->{proxyurl} =~ /^(?:http|https):\/\/(.*?):(.*?)@/) {
$self->curl_setopt(option => $self->{constant_cb}->(name => 'CURLOPT_PROXYUSERNAME'), parameter => $1);
$self->curl_setopt(option => $self->{constant_cb}->(name => 'CURLOPT_PROXYPASSWORD'), parameter => $2);
$options{request}->{proxyurl} =~ s/\/\/$1:$2@//;
}
$self->curl_setopt(option => $self->{constant_cb}->(name => 'CURLOPT_PROXY'), parameter => $options{request}->{proxyurl});
}