Skip to content

HTTP Proxy doesn't work with SSL on Linux #528

@ChristophAlbert

Description

@ChristophAlbert

I have a very simple test program:

#include <iostream>
#include "cpprest/http_client.h"
using namespace std;
using namespace web::http;
using namespace web::http::client;

int main()
{
  web::web_proxy proxy("https://www-myproxy:8080");
  credentials proxyCredentials("user","Password");
  proxy.set_credentials(proxyCredentials);

  http_client_config config;
  config.set_proxy(proxy);
  http_client client("https://www.google.de", config);
  auto response = client.request(methods::GET).get();
  cout << response.status_code() << endl;
  std::cout << response.extract_string(true).get() << std::endl;
}

Even after applying PR527, it doesn't work on Linux but results in an http_exception with error message "Error in SSL handshake".
However, it runs fine on Windows (with wstrings). It also runs fine on Linux when I retrieve http://www.google.de instead of https://www.google.de.

Any idea what could be the issue here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions