I send the following request using HTTPS protocol, however, the server replies that it receives HTTP requests instead of HTTPS:
$request = {
'method' => 'GET',
'ssl_options' => {
'SSL_server' => 1,
'SSL_hostname' => $hostname,
'SSL_verifycn_scheme' => 'https',
'SSL_verifycn_name' => $hostname
},
'port' => 443,
'scheme' => 'https',
'query_string' => undef,
'callback' => $callback,
'path' => $request_url,
'head' => [
'Accept',
'application/vnd.api+json',
'X-PONAPI-Client-Version',
'1.0',
'X-PONAPI-Escaped-Values',
'1'
],
'host' => $hostname
};
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
</p>
<hr>
<address>Apache/2.4.10 (Debian) Server at solsa.crystallography.net Port 443</address>
</body></html>
This seems to be the symptom of an HTTP request to a HTTPS port. I am using YAHC 0.035.