Trouble making HTTPS request from Delphi 7 client

I have a nodejs app deployed on 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
  Source: TMemoryStream;
  Response: TStringStream;
  cbURL: String;
  cbMethod: integer;
  IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL;
  IdSSLIOHandlerSocketOpenSSL1:= TIdSSLIOHandlerSOcketOpenSSL.Create(Nil);
//  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvTLSv1;
//  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv2;
//  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv23;
  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv3;

  cbURL:= '';
  cbMethod:= 1;
  Screen.Cursor := crHourGlass;
    // 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']:= '';
//    HTTP.Request.Host:= '';
    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.

Hi @francowerner. Regarding the SSL error: SSLv3 is very old and is considered insecure. I believe that our edge proxy supports only TLS v1.2 (2008) and TLS v1.3 (2018), which are the latest two versions. I don’t know much about Delphi, but after quickly looking it up it seems like your library might not enable a compatible TLS version by default. Can you manually enable one?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.