I have a nodejs app deployed on fly.io and it works as intended when making requests from javascript, postman, mobile devices, etc. The issue is i need to make POST/GET/PATCH requests from an older piece of software made with Delphi 7 but i cant get it to work. It can make HTTPS requests succesfully (it works with other services such as amazon SNS).
Fly’s console returns “client problem: no host specified in headers or uri”. Ive read on this post that its an HTTP version problem (it says there is no host on header params). I’m using HTTP 1.1, and i’ve logged the request im making on delphi and it does have the host header on the uri when its sent. Here is the code for delphi HTTP request:
type or paste code here
```var
Source: TMemoryStream;
Response: TStringStream;
cbURL: String;
cbMethod: integer;
IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL;
begin
IdSSLOpenSSLHeaders.Load;
IdSSLIOHandlerSocketOpenSSL1:= TIdSSLIOHandlerSOcketOpenSSL.Create(Nil);
// IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvTLSv1;
// IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv2;
// IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv23;
IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv3;
cbURL:= 'https://myassistance-test.fly.dev/laya';
cbMethod:= 1;
Screen.Cursor := crHourGlass;
try
memoHTML.Clear;
// Set the properties for HTTP
// HTTP.Request.Username := edUsername.Text;
// HTTP.Request.Password := edPassword.Text;
// HTTP.Request.ProxyServer := edProxyServer.Text;
// HTTP.Request.ProxyPort := StrToIntDef(edProxyPort.Text, 80);
HTTP.Request.ContentType := 'application/x-www-form-urlencoded';
//HTTP.Request.CustomHeaders.Values['Host']:= 'myassistance-test.fly.dev';
// HTTP.Request.Host:= 'myassistanceapi.fly.dev';
HTTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
What can i do? ive tried different delphi components without success, i shouldn’t have to since it works with other HTTPS calls. Delphi returns “Error connecting with SSL”. Ive tried many ssl certificate versions as well, and none of them work. I think i have v3 of ssl running on my fly instance but i didnt find a way to check if thats correct.