title: Why Sending multi-part form data using SSL & POCO returns status 411?
body: <p>I have written an interface to use the JIRA Service Desk API. One of the REST API calls I have implemented does a HTTP POST of multipart/form-data. This works fine when i use HTTP, however when I use HTTPS i get a <code>411 Length Required</code> response.</p>
  
  <p>The REST API call command works fine over HTTPS when I use curl or postman.</p>
  
  <p>Is there something I am missing when HTTPS is used?</p>
  
  <p>my form post code is as follows:</p>
  
  <pre><code>// generic form send
  RESTClient::Error RESTClient::HTTPFormSend(
      const std::string &amp; method,
      const std::string &amp; command,
      const Params &amp; headerParams,
      Poco::Net::HTMLForm &amp; form,
      HTTPRequestSetup requestFunc
  )
  {
      Error ret = Error::None;
  
      try
      {
          Poco::Net::HTTPRequest request;
  
          Poco::SharedPtr&lt;Poco::Net::HTTPClientSession&gt; pSession(PrepareSession(method, command, headerParams, request));
  
          Poco::Net::HTTPResponse httpResponse;
  
          // authenticate
          m_credentials.authenticate(request);
  
          // custom request setup    
          if (requestFunc)
              requestFunc(request);
  
          if (!DoFormRequest(pSession, request, httpResponse, form))
          {
              m_credentials.authenticate(request);
  
              if (!DoFormRequest(pSession, request, httpResponse, form))
              {
                  m_logger.error("Invalid username or password");
              }
          }
      }
      catch (const Poco::Exception &amp;ex)
      {
          m_logger.error(ex.displayText());
          ret = Error::Internal;
      }
  
      return ret;
  }
  
  // send form
  bool RESTClient::DoFormRequest(
      Poco::Net::HTTPClientSession *pSession,
      Poco::Net::HTTPRequest &amp; request,
      Poco::Net::HTTPResponse &amp; response,
      Poco::Net::HTMLForm &amp;form
  )
  {
      Poco::LogStream logStream(m_logger);
  
      form.prepareSubmit(request);
  
      pSession-&gt;setTimeout(Poco::Timespan(20, 0));
  
      form.write(pSession-&gt;sendRequest(request));
  
      return ProcessResponse(pSession, response);
  }
  </code></pre>