indy10

Adding custom header to TIdHttp request, header value has commas

a 夏天 提交于 2019-12-21 09:28:07
问题 I'm using Delphi XE2 and Indy 10.5.8.0. I have an instance of TIdHttp and I need to add a custom header to the request. The header value has commas in it so it's getting parsed automatically into multiple headers. I don't want it to do that. I need the header value for my custom header to still be one string and not split based on a comma delimiter. I have tried setting IdHttp1.Request.CustomHeaders.Delimiter := ';' with no success. Is there a way to make sure the header doesn't get split up?

Update to latest Indy TCP library version

落花浮王杯 提交于 2019-12-18 09:04:45
问题 I'm using DELPHI XE2 since E/2011. I checked now the implemented INDY Lib shipped with my compiler, and found gsIdVersion = '10.5.8.0'; If I want to upgrade to the latest INDY version, I use Indy download link here I found LATEST INDY ZIP FILE. The date of the file is from today, the revision is is less then my installed indy version ID. bevore doing any further action, Can some help me and solve my version number confusion 回答1: According to the subversion repo, the latest revision for Indy

How to make Indy OpenSSL compatible with most servers

允我心安 提交于 2019-12-17 20:13:22
问题 I use the following code to setup SSLHandler for POP3/SMTP sending/receiving app: IdSSLHandler->SSLOptions->Mode = sslmClient; IdSSLHandler->SSLOptions->Method = slvSSLv23; IdSSLHandler->SSLOptions->SSLVersions = TIdSSLVersions() << sslvSSLv3 << sslvTLSv1 << sslvTLSv1_1 << sslvTLSv1_2; So, the above code is supposed to support SSL 3, TLS 1, TLS 1.1 and TLS 1.2 automatically. This does not work well and reports "wrong version" error. When the SSLVersions line is removed then it works but by

Step by step upgrade of Indy 10 in Delphi 2009

送分小仙女□ 提交于 2019-12-17 07:26:22
问题 Can someone help in telling the details on how to uninstall Indy 10 and install the latest build? I found it http://indy.fulgan.com/ZIP/IndyTiburon.zip There is a similar question, but not a satisfying answer, just some comments from the user who asked, but that is not a step by step guide. Why there is not a tool for this? 回答1: I did this very recently, I've done it before with 2007 and had lots of problems, but this time in D2010 it went really well... Assumptions: The Indy BPL's are stored

How to handle TIdHTTPServer with TIdMultiPartFormDataStream

孤街浪徒 提交于 2019-12-14 01:12:48
问题 Hi i need help on how to retrieved the parameters and data using IdHttpServer from indy. many of my application uses TIdMultiPartFormDataStream to send data over the php. I would like to use the TIdHTTPServer to verify parameters for some reason and forward the request to its destination. i created a short example for you to see. uses IdContext, IdMultipartFormData; // Server Side------------------------------------------------ IdHTTPServer1.Defaultport := 88; IdHTTPServer1.active := True;

Indy - Know when modem has sent a RESET [RST] flag

醉酒当歌 提交于 2019-12-13 13:45:12
问题 I have noticed that I receive an EIdSocketError with LastError = 10054 or 10053 when the device I'm talking to sends a RESET response. Which makes sense, given 10054 is Connection Reset By Peer. So is there anything I can check in Indy to determine if this has ocurred rather than wrapping my code in try/except block and looking for 10054 or 10053 error codes? One scenario I encountered was the modem replied with a RESET reply after I connected (Indy didn't raise an exception) so from my point

How can I read email with HTML format in a Delphi application?

人盡茶涼 提交于 2019-12-13 07:28:12
问题 I have created a program that can read email from Exchange 2007. However, it can only read the body of the email in plain-text format. When I tried to retrieve email in HTML format, my software cannot read the body and it always blank. I am using Delphi 2007 and IMAP 9. Update: Here is my code: procedure TForm1.tmrCekTimer(Sender: TObject); var TheFlags: TIdMessageFlagsSet; TheUID: string; TheMsg: TIdMessage; MailBoxName: string; MyClass: TComponent; begin MailBoxName := 'INBOX'; if TheImap

how to process a mime email to vcl

偶尔善良 提交于 2019-12-13 06:59:13
问题 I run a small e mail client build with delphi and indy 10. Some mails i receive have the mime format or html format. With the current code I just copy the bode.lines to a memo.lines MyMailMemo.Lines.AddStrings (TIdMessage(Msg.Body); How do I copy the content of mime emails? 回答1: MIME-encoded emails do not use the TIdMessage.Body property. They use the TIdMessage.MessageParts property instead, where textual MIME parts are stored as TIdText objects and attachments are stored as TIdAttachment

How to blacklist an IP on TIdHTTPServer

不问归期 提交于 2019-12-13 04:39:26
问题 In a TIdHTTPServer component, I'd like to enable a blacklist of IP addresses to block. I'd like to make sure this is on the lowest level possible to prevent any unnecessary data streaming in from a blacklisted client. How should I intercept this server component to block an IP on the lowest level possible? This applies to both IP v4 and v6 回答1: On Indy 9, there was an event for refusing a connection before it was actually accepted. On Indy 10, it's still not implemented. If you look at

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