title: Delphi - Indy 10 #10600 Connection Timeout with POST over 32767 bytes
body: <p>I'm having a persistent problem using Indy 10 where I am posting a string of XML encoded as a <code>TIdMultiPartFormDataStream</code>, the code that I am using to invoke the POST is given below. A majority of the time, this works no problem, however I am getting a repeated error when running on Windows 7 that throws a #10060 Connection Timeout socket error only when the XML string is longer than 32767 bytes, anything under that size works without a problem.</p>
  
  <p>I have verified that it is not related to the server I am posting to, as there is no problem for messages of any size sent with the same code/application on Windows XP. </p>
  
  <pre><code>IdHTTP2 := TIdHTTP.Create();
  
  UsingHTTPS := (Pos(LowerCase('https://'), Trim(LowerCase(URL)))&gt; 0);
  if UsingHTTPS then begin
  IdSSLIOHandlerSocketOpenSSL2:=TIdSSLIOHandlerSocketOpenSSL.Create();
    with IdSSLIOHandlerSocketOpenSSL2 do
    begin
      SSLOptions.Method := sslvTLSv1;
      SSLOptions.Mode := sslmUnassigned;
      SSLOptions.VerifyMode := [];
      SSLOptions.VerifyDepth := 0;
      Port := 443;
    end;
   end; //if UsingHTTPS
  
  
  try
    try
      with IdHTTP2 do
      begin //with some browser style defaults
        AllowCookies := False;
        ProxyParams.BasicAuthentication := False;
        //ProxyParams.ProxyPort := 0;
        Request.ContentLength := data.Size;
        Request.host := '';
        Request.CustomHeaders.Clear;
        Request.Accept := '';
        Request.ContentEncoding := '';
        IOHandler:=IdSSLIOHandlerSocketOpenSSL2;
        ReadTimeout := -1;
      end;
  
  
       //http post
      IdHTTP2.Post(URL, data, response);
  </code></pre>
  
  <p>Does anyone have any recommendations to solve this problem? I tried to set the <code>ReadTimeout</code> variable but this had no change. Any pointers to solve this problem would be much appreciated. </p>