码迷,mamicode.com
首页 > Web开发 > 详细

idhttp访问出现onnection closed gracefully

时间:2020-07-07 13:16:55      阅读:91      评论:0      收藏:0      [点我收藏+]

标签:mod   sed   ant   param   signed   tlsv1   redirect   expected   assign   

idhttp=new TIdHTTP(NULL);
idhttp->AllowCookies =true;
idhttp->HandleRedirects =true; //允许重定向
idhttp->ConnectTimeout =20000;
idhttp->ReadTimeout =20000;
//hoInProcessAuth, hoKeepOrigProtocol, hoForceEncodeParams, hoNonSSLProxyUseConnectVerb, hoNoParseMetaHTTPEquiv, hoWaitForUnexpectedData, hoTreat302Like303, hoNoProtocolErrorException, hoNoReadMultipartMIME, hoNoParseXmlCharset, hoWantProtocolErrorContent, hoNoReadChunked
idhttp->HTTPOptions <<hoKeepOrigProtocol;  //这一句很关键
//pv1_0, pv1_1
idhttp->ProtocolVersion =pv1_1;

SSLIO=new TIdSSLIOHandlerSocketOpenSSL();
//sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2
SSLIO->SSLOptions->Method = sslvTLSv1_2;
//sslmUnassigned, sslmClient, sslmServer, sslmBoth
SSLIO->SSLOptions->Mode = sslmClient;
SSLIO->ConnectTimeout =20000;
idhttp->IOHandler=SSLIO;

idhttp访问出现onnection closed gracefully

标签:mod   sed   ant   param   signed   tlsv1   redirect   expected   assign   

原文地址:https://www.cnblogs.com/suhq/p/13259914.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!