title: Unexpected end of file exception in CURL but POSTMAN and SOAP UI work fine
body: <p>I'm trying to communicate with a SOAP server over a proxy server in a PHP App.
  All of the requests seem to be fine in the PHP App.One of the requests return me the following exception.If I test the same request in soapui and postman it seems to be ok.</p>
  
  <p>I used the "Generate Code Snippets" function of POSTMAN to create the CURL request in PHP.I ended up with the following code.</p>
  
  <pre><code> $curl = curl_init();
  
      curl_setopt_array($curl, array(
          CURLOPT_URL =&gt; "********",
          CURLOPT_RETURNTRANSFER =&gt; true,
          CURLOPT_ENCODING =&gt; "",
          CURLOPT_MAXREDIRS =&gt; 10,
          CURLOPT_TIMEOUT =&gt; 30,
          CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
          CURLOPT_CUSTOMREQUEST =&gt; "POST",
          CURLOPT_POSTFIELDS =&gt; "&lt;soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ws=\"http://ws.s5.mediasat.de/\"&gt; "
          . "&lt;soapenv:Header&gt; &lt;wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" soapenv:mustUnderstand=\"1\"&gt; "
          . "&lt;wsse:UsernameToken&gt; &lt;wsse:Username&gt;******&lt;/wsse:Username&gt; &lt;wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\"&gt;********&lt;/wsse:Password&gt; &lt;/wsse:UsernameToken&gt; &lt;/wsse:Security&gt; &lt;/soapenv:Header&gt; "
          . "&lt;soapenv:Body&gt; &lt;ws:putCall&gt; &lt;transaction&gt;createIncident&lt;/transaction&gt; &lt;transactionID /&gt; "
          . "&lt;transactionSender&gt;Submit Request&lt;/transactionSender&gt; &lt;caseDataModel&gt; &lt;senderId&gt;19&lt;/senderId&gt; "
          . "&lt;ticketNumberSender&gt;1234&lt;/ticketNumberSender&gt; &lt;ticketNumber /&gt; &lt;ticketTypeId&gt;106&lt;/ticketTypeId&gt; "
          . "&lt;createTypeId&gt;701&lt;/createTypeId&gt; &lt;title&gt;Issue with priority (B001APP05M)&lt;/title&gt; &lt;description /&gt; "
          . "&lt;serviceId&gt;I002S5001P&lt;/serviceId&gt; &lt;categoryId&gt;128&lt;/categoryId&gt; &lt;serviceRecipientId&gt;18176&lt;/serviceRecipientId&gt; "
          . "&lt;serviceLocationSAPCode&gt;V135&lt;/serviceLocationSAPCode&gt; &lt;priorityId&gt;102&lt;/priorityId&gt; &lt;assignmentUserId&gt;458&lt;/assignmentUserId&gt; "
          . "&lt;CIName /&gt; &lt;timestampStart /&gt; &lt;timestampEnd /&gt; &lt;informationText /&gt; &lt;solutionText /&gt; &lt;solutionCode /&gt; &lt;closureText /&gt; "
          . "&lt;closureCode /&gt; &lt;cancellationText /&gt; &lt;cancellationCode /&gt; &lt;errorText /&gt; &lt;errorCode /&gt; &lt;nameSenderText /&gt; &lt;statusSenderText /&gt; "
          . "&lt;timestampSender /&gt; &lt;attachmentFilename /&gt; &lt;attachmentData /&gt; &lt;/caseDataModel&gt; &lt;/ws:putCall&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; ",
          CURLOPT_HTTPHEADER =&gt; array(
              "accept-charset: utf-8",
              "accept-encoding: utf-8",
              "cache-control: no-cache",
              "connection: Keep-Alive",
              "content-type: text/xml",
              "soapaction: \"/IntS5/S5WS\""
          ),
      ));
      $result = curl_exec($curl);
      $err = curl_error($curl);
      curl_close($curl);
      return $result;
  </code></pre>
  
  <p><strong>EXCEPTION:</strong></p>
  
  <pre><code>Error sending request to server ******* from interface null Error=java.net.SocketException: Unexpected end of file from server
      at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
      at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.expect100Continue(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
      at com.tibco.cep.httpclient.standard.HttpClient.doRequest(HttpClient.java:339)
      at com.tibco.cep.httpclient.kernel.BaseHttpClient.process(BaseHttpClient.java:188)
      at com.tibco.cep.httpclient.kernel.HttpWorker.run(HttpWorker.java:62)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Any ideas why the server does not like my request body?</p>