title: File gets corrupted while upload
body: <p>I am uploading a file through multipartEntityBuilder in java.
  file get uploaded but gets corrupted, as content header gets mixed with data at file.</p>
  
  <p>getting error in text and image formats working fine for pdf.</p>
  
  <pre><code>HttpClient httpclient =new HttpClient();
  HttpPut post = new HttpPut(uploadfileurl);
  File file = new File(fileUrl);
  MultipartEntityBuilder builder = MultipartEntityBuilder.create();         
  builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
  builder.addBinaryBody("upfile", file, ContentType.DEFAULT_BINARY, "test.txt");
  
  builder.addTextBody("text", message, ContentType.TEXT_PLAIN);
  HttpEntity entity = builder.build();
  post.setEntity(entity);
  post.setHeader("enctype", "multipart/form-data");
  HttpResponse httpresponse =  httpclient.execute(post);
  HttpEntity resEntity = httpresponse.getEntity();
  </code></pre>
  
  <p>Error  in file :: 
  this should be like this :</p>
  
  <p>this file is for testing</p>
  
  <p>but it going like this :</p>
  
  <p>---------------1427465571114
  Content-Disposition: form-data; name="upfile"; filename=""
  Content-Type: application/octet-stream</p>
  
  <p>this file is for testing</p>
  
  <p>---------------1427465571114--</p>