【发布时间】:2019-09-12 22:14:02
【问题描述】:
我正在使用 Chilkat ActiveX (Delphi) 9.5 版。 我使用 TChilkatHTTP 将一些数据发布到 HTTPS url。
http.SynchronousRequest(Host,443,0,req.ControlInterface);
我得到的响应是“普通 HTTP 请求已发送到 HTTPS 端口”
我已经在 Google 上搜索了很多天以寻求解决方案,但无法找到可行的解决方案。请如果有人知道我错过了什么。
非常感谢。
以下是 Chilkat 日志:
---- Sending ----
POST /qrCreate HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: api-testing.payhalal.my
Content-Length: 232
app_id=app-testing-d2277670007a30c2e6b6919fdfc696dd&amount=¤cy=MYR&product_description=MY%20PRODUCT&order_id=12345&customer_name=SHELY&customer_email=eeshely%40gmail.com&customer_phone=0127806698&language=EN&timeout=3600&hash=
---- Received ----
HTTP/1.1 400 Bad Request
Server: nginx
Date: Thu, 12 Sep 2019 10:23:07 GMT
Content-Type: text/html
Content-Length: 264
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubDomains
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
【问题讨论】: