indy

Error 406 Not Acceptable with idHTTP on Android

孤街浪徒 提交于 2019-12-02 00:06:12
I'm trying to post a insert on a MySQL database using idHTTP and a PHP script. This is the PHP script to insert in the database: $mysqli = new mysqli($servidor, $usuario, $senha, $banco); // Caso algo tenha dado errado, exibe uma mensagem de erro if (mysqli_connect_errno()) trigger_error(mysqli_connect_error()); $iduser = quoted_printable_decode($_POST['iduser']); $nome = quoted_printable_decode($_POST['nome']); $data = quoted_printable_decode($_POST['data']); $hora = quoted_printable_decode($_POST['hora']); $mensagem = quoted_printable_decode($_POST['mensagem']); $latitude = quoted_printable

Is the order of cipher names in TIdServerIOHandlerSSLOpenSSL.SSLOptions.CipherList important?

£可爱£侵袭症+ 提交于 2019-12-01 22:51:37
问题 I'm limiting the ciphers that my webservice allows to only these TLS 1.x ciphers: TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA256 TLS_RSA_WITH_AES_128_GCM_SHA256 TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_256_CBC_SHA256 TLS_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA TLS_RSA_WITH_CAMELLIA_256_CBC_SHA TLS_RSA_WITH_IDEA_CBC_SHA TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_WITH_RC4_128_SHA Update in response to Dave Thompson's comment: I now take the ciphers generated from

How can I use Tidhttp to make a Get request with a parameter called xml?

血红的双手。 提交于 2019-12-01 22:17:33
I've been successfully using Delphi 2010 to make an http get requests, but for one service that expects a parameter called 'xml' the request fails with a 'HTTP/1.1 400 Bad Request' error. I notice that calling the same service and omitting the 'xml' parameter works. I have tried the following with no success: HttpGet('http://localhost/Service/Messaging.svc/SendReports/PDF?xml=<?xml version="1.0"?><email><message><to>email@internal.com</to><from>from@internal.com</from></message></email>&id=42&profile=A1'); ... function TReportingFrame.HttpGet(const url: string): string; var responseStream :

Is the order of cipher names in TIdServerIOHandlerSSLOpenSSL.SSLOptions.CipherList important?

被刻印的时光 ゝ 提交于 2019-12-01 18:23:00
I'm limiting the ciphers that my webservice allows to only these TLS 1.x ciphers: TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA256 TLS_RSA_WITH_AES_128_GCM_SHA256 TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_256_CBC_SHA256 TLS_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA TLS_RSA_WITH_CAMELLIA_256_CBC_SHA TLS_RSA_WITH_IDEA_CBC_SHA TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_WITH_RC4_128_SHA Update in response to Dave Thompson 's comment: I now take the ciphers generated from this SO answer , in that order. Because we currently use Delphi XE2/Indy 10.5.8.0/OpenSSL 1.0.2f I

Indy “Could not load SSL library” Delphi XE2 IW14

坚强是说给别人听的谎言 提交于 2019-12-01 18:15:44
问题 I know this question has been asked before but none of the answers seem to be appropriate for this situation. I'm using a TIdHttp component with an SSL handler. My code is as follows: idHTTPClient := TIdHTTP.Create(nil); ioHnd := TIdSSLIOHandlerSocketOpenSSL.Create(nil); ioHnd.DefaultPort := iSSL_PORT; ioHnd.SSLOptions.Mode := sslmClient; idHTTPClient.IOHandler := ioHnd; idHTTPClient.Request.AcceptEncoding := 'gzip,deflate,identity'; idHTTPClient.Request.BasicAuthentication := False; try

Indy “Could not load SSL library” Delphi XE2 IW14

二次信任 提交于 2019-12-01 18:01:49
I know this question has been asked before but none of the answers seem to be appropriate for this situation. I'm using a TIdHttp component with an SSL handler. My code is as follows: idHTTPClient := TIdHTTP.Create(nil); ioHnd := TIdSSLIOHandlerSocketOpenSSL.Create(nil); ioHnd.DefaultPort := iSSL_PORT; ioHnd.SSLOptions.Mode := sslmClient; idHTTPClient.IOHandler := ioHnd; idHTTPClient.Request.AcceptEncoding := 'gzip,deflate,identity'; idHTTPClient.Request.BasicAuthentication := False; try idHTTPClient.Post(FFQDN, stmRequest, stmResponse); except on E:Exception do begin if IdSSLOpenSSLHeaders

Send an e-mail with rtf text in delphi

谁说胖子不能爱 提交于 2019-12-01 17:27:38
问题 I would like to perform the following task: converting a TRichEdit content (an rtf text) into a not-plain-text e-mail message body. MAPI doesn't support rtf, but is there a way to do it maybe with Indy? The problem is that rtf is rtf and emails are plain text or HTML. Can someone suggest a trick? Is it possible to convert rtf to text using TWebBrowser? Basically the scenario is: 1) User writes email in a delphi form, 2) The email is then sent with MAPI to the default mail client (so a new

Delphi + Indy: Connection closed gracefully

随声附和 提交于 2019-12-01 16:18:00
Using D7 + Indy 10 latest build. My code is using TIdSMTP to send email. I keep getting "Connection closed gracefully" at some end-users, and the email is never sent. The code is like: try ~~~~ ~~~~ _idSMTP := TIdSmtp.Create; with _idSMTP do begin Host := 'myhost'; Connect; try Send(_EmailMsg); Result := True; except on E: Exception do begin MsgDlgErr(Self.Handle, E.Message) end end; end; finally _idSMTP.Disconnect; _idSMTP.Free; end; Any advice? Read all about it on http://www.swissdelphicenter.ch/en/showarticle.php?id=1 EIdConnClosedGracefully is an exception signaling that the connection

Why am I getting “Connection reset by peer” with Indy only on a HTTPS (SSL) site?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 13:03:48
I am trying to use Indy HTTP (Delphi Seattle) to get the contents of a https webpage and I always seem to get Error 10054 - Connection reset by peer. Other sites seem to work just fine. The website in cause is https://www.adultwork.com . I have added the SSL, Cookie and Compressor components, but maybe I'm missing something, some settings, IDK... If anybody could help, it would be greatly appreciated. I was able to reproduce the issue, and it is due to Indy's TIdIOHandlerSocketOpenSSL component only enabling TLS v1.0 by default . Like many other sites nowadays, AdultWorks does not accept TLS 1

Indy error 10038 “Socket operation on non-socket” after 61 seconds of inactivity

给你一囗甜甜゛ 提交于 2019-12-01 12:30:30
I want to download some large files (GB) from an FTP server. The download of the first file always works. Then when trying to get the second file I get: "Socket Error # 10038. Socket operation on non-socket." The error is on 'Get'. After 'Get' I see these messages (via FTP status event): Starting FTP transfer Disconnecting. Disconnected. The code is like this: {pseudo-code} for 1 to AllFiles do begin if Connect2FTP then begin FTP.Get(Name, GzFile, TRUE, FALSE); <--- Socket operation on non-socket" error (I also get EIdConnClosedGracefully 'Connection Closed Gracefully' in IDE, F9 will resume