1
IdConnectionInterceptOpenSSL->SSLOptions->Method = sslvSSLv23;
IdConnectionInterceptOpenSSL->SSLOptions->Mode = sslmClient;
IdConnectionInterceptOpenSSL->SSLOptions->VerifyDepth = 0;

//....

TCHAR* SIR = SIRX[ix].c_str();

AnsiString rtf;
TStringStream * Send = new TStringStream(rtf) ;
Send->Write(SIR, (SIRX[ix]).Length());  // <-- new
Send->Position = 0;

TMemoryStream *Receive = new TMemoryStream() ;

AnsiString ADRESA = "https://webservicesp.anaf.ro:443/PlatitorTvaRest/api/v1/ws/tva";

IdHTTP->Request->Accept = "application/json";
IdHTTP->Request->ContentType = "application/json";
IdHTTP->Request->Connection = "Keep-Alive";

IdHTTP->Post(ADRESA, Send, Receive);

直接インターネット接続を使用すると、問題なく動作します。

インターネット接続にプロキシ サーバーを使用すると、問題が発生します。

置いた

IdHTTP->Request->ProxyServer = PROXY_SERVER;
IdHTTP->Request->ProxyPort = StrToInt(PROXY_PORT);
if(PROXY_USER.IsEmpty() == false)
    IdHTTP->Request->ProxyUsername = PROXY_USER;
if(PROXY_PASSW.IsEmpty() == false)
    IdHTTP->Request->ProxyPassword = PROXY_PASSW;

しかし、エラーは次のように表示connection closed gracefullyされます。最初の尋問で、その後、同じ尋問で501 Not Implemented.

問題はどこだ?解決策はありますか?

4

0 に答える 0