indy

How can I check I am actually connected to the internet

限于喜欢 提交于 2019-12-13 03:08:44
问题 I am using Indy to connect to an Ftp server. We have had problems with the server being down, creating a "Host not found" error, which I handle and indicate to the user, however, today the software was installed on a computer that did not have an internet connection. The error produced when I "Connect" is also "Host not found", which is not totally correct. Is there a function/procedure I can call inside the TIdFtp component that will tell me if there is actually a connection to the internet

How to clear the Indy TIdHTTP BasicAuthentication credentials?

回眸只為那壹抹淺笑 提交于 2019-12-13 02:22:15
问题 I'm using the Indy TIdHTTP for get request with BasicAuthentication. Code working fine, but TIdHTTP doesn't clearing the BasicAuthentication credentials after first 401, if user retype the credentials and send request again, with right login-password. User must login twice to authorize. User action sequence: Step 1. User type wrong login-password: ResponseCode = 401 Step 2. User type right login-password: ResponseCode = 401 Step 3. User type right login-password: ResponseCode = 200 Result on

Why does IdHTTPProxyServer change the HTTP version of requests?

烂漫一生 提交于 2019-12-12 15:32:41
问题 Recently, I found that IdHTTPProxyServer automatically changes all HTTP/1.1 requests to HTTP/1.0 requests. It is a little bit weird for me as I think a proxy server should not change the HTTP version. Is there any way I can force the proxy server to not change HTTP version? 回答1: TIdHTTPProxyServer does not support HTTP 1.1 at this time. The behavior that changes the HTTP version is hard-coded, as TIdHTTPProxyServer is not actually passing through the client's request as-is, but is sending its

AppEngine error 400 when requesting access token

我们两清 提交于 2019-12-12 12:31:33
问题 I'm writing a Delphi based PC application which accesses an AppEngine servlet. I'm trying to use the OAuth 1.0 dance to authenticate users and allow access to a restricted part of the application. I'm able to get access to the restricted servlet using a browser and going through google user authentication. I'm now trying to implement the dance. I successfully get the token and token secret using OAuthGetRequestToken. Key := 'XXXX.appspot.com'; Secret := 'YYYY'; URL := 'https://XXXX.appspot

tidhttp: weird SSLv3_READ_BYTES error (with directly set up TLSv1_2 connection)

吃可爱长大的小学妹 提交于 2019-12-12 10:56:51
问题 Simple code: procedure TForm1.Button1Click(Sender: TObject); //var //h: tIdHTTP; //SSL: TIdSSLIOHandlerSocketOpenSSL; begin h.IOHandler := SSL; SSL.SSLOptions.Method := sslvTLSv1_2; SSL.SLLOptions.SSLVersion := [sslvTLSv1_2]; //must be set automatically after SetMethod, but just to be sure h.Get('https://www.deviantart.com/users/login'); end; That simple code gives me an error: Error connecting with SSL. error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure I use Delphi

Strange rare out-of-order data received using Indy

橙三吉。 提交于 2019-12-12 10:26:19
问题 We're having a bizarre problem with Indy10 where two large strings (a few hundred characters each) that we send out one after the other using TCP are appearing at the other end intertwined oddly. This happens extremely infrequently. Each string is a complete XML message terminated with a LF and in general the READ process reads an entire XML message, returning when it sees the LF. The call to actually send the message is protected by a critical section around the call to the IOHandler's

Delphi - logging in to webpage from code

走远了吗. 提交于 2019-12-12 10:22:21
问题 I am using Delphi 7 and require some help with a problem, and yes, I have searched everywhere for an answer, yet the supplied code isn't documented , so I have no idea how it works or how to adjust it to fit my needs. What I am trying to achieve is to log in to the website http://kissanime.com/login .. The problem I'm experiencing is that I need to stay logged in while my program does some work on that website's HTML ( Basically I want to parse out the download links of a certain series, but

Delphi XE2 Indy 10 TIdCmdTCPServer freezing application

孤街浪徒 提交于 2019-12-12 09:22:50
问题 I'm just starting to learn how to use the Indy 10 components in Delphi XE2. I started with a project that will use the command sockets ( TIdCmdTCPServer and TIdCmdTCPClient ). I've got everything set up and the client connects to the server, but after the client connects, any command the server sends to the client just freezes the server app, until it eventually crashes and closes (after a deep freeze). Project Setup The setup is very simple; there's a small server app and a small client app,

SSL support for smtp.live.com and TIdSmtp (Indy, Delphi)

喜你入骨 提交于 2019-12-12 07:55:46
问题 I am trying to connect to smtp.live.com to send emails (live.com supports free pop3/smtp since 2009 apparently but this is totally news for me). Here is what happens when I try to connect to smtp.live.com port 587: Method sslvSSLv2 - timeout (obviously the server does not support SSL2) Method sslvSSLv3 - Error connecting with SSL. - error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number Method sslvSSLv23 - Error connecting with SSL. - error:140770FC:SSL routines:SSL23_GET_SERVER

Exception class EIdReadTimeout with message 'Read timed out' [Indy-IdFTP]

[亡魂溺海] 提交于 2019-12-12 04:48:40
问题 I want to download a file from FTP. If the file is small (usually under 1000MB) it works. However, if the file is big I get an EIdReadTimeout. Why? Should I keep the connection alive? From what I know reading data has its own channel so I don't have to keep the connection alive. What is odd is that the exception appears at the end of the Get (after Get successfully downloads the whole file): FTP.Get(Name, TempGzFile, TRUE, FALSE) !!!! Documentation: TIdFTP.ReadTimeout - Number of milliseconds