title: Is this HTTP request valid?
body: <p>I've made an python server with <code>swagger-codegen</code>. I have one endpoint that receives an file with <code>mutlipart/form-data</code></p>
  
  <p>And also created an client with <a href="https://github.com/go-swagger/go-swagger" rel="nofollow noreferrer">go-swagger</a> for testing.</p>
  
  <p>created an file to upload: <code>$ echo "123file content321" &gt; data</code></p>
  
  <p>and used the client to upload the file to the server. The resulting HTTP request looks like this:</p>
  
  <pre><code>POST /api/order/1/attachment HTTP/1.1
  Host: 127.0.0.1:8080
  User-Agent: Go-http-client/1.1
  Transfer-Encoding: chunked
  Accept: application/json
  Content-Type: multipart/form-data; boundary=5f3f0ad86e6345b77c869cbe0a5e608f038354cf9ceab74ec2533d7555c0
  Accept-Encoding: gzip
  
  ff
  --5f3f0ad86e6345b77c869cbe0a5e608f038354cf9ceab74ec2533d7555c0
  Content-Disposition: form-data; name="file"; filename="data"
  Content-Type: application/octet-stream
  
  123file content321
  
  --5f3f0ad86e6345b77c869cbe0a5e608f038354cf9ceab74ec2533d7555c0--
  </code></pre>
  
  <p>but the server doesn't accept it and responds:</p>
  
  <pre><code>HTTP/1.0 400 BAD REQUEST
  Connection: close
  Content-Length: 120
  Content-Type: application/problem+json
  Date: Fri, 19 May 2017 15:15:44 GMT
  Server: Werkzeug/0.12.1 Python/3.6.1
  {
    "type": "about:blank",
    "title": "Bad Request",
    "detail": "Missing formdata parameter 'file'",
    "status": 400
  }
  </code></pre>
  
  <p>So the request isn't parsed properly. But when I use the swagger-ui, the file is uploaded correctly. Is there problem with the client's request, or the server has a problem?</p>
  
  <p>EDIT: I think that there is missing <code>Content-Lenght</code> or the <code>ff</code> at the beginning of the BODY might not be there </p>
  
  <p>EDIT2: the swagger-ui request:</p>
  
  <pre><code>POST /api/order/1/attachment HTTP/1.1
  Host: localhost:8080
  Connection: keep-alive
  Content-Length: 211
  Origin: http://localhost:8080
  User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
  Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypzmNwrDR7zzpZ7SJ
  Accept: application/json
  X-Requested-With: XMLHttpRequest
  DNT: 1
  Accept-Encoding: gzip, deflate, br
  Accept-Language: en-US,en;q=0.8
  
  ------WebKitFormBoundarypzmNwrDR7zzpZ7SJ
  Content-Disposition: form-data; name="file"; filename="data"
  Content-Type: application/octet-stream
  
  123file content321
  
  ------WebKitFormBoundarypzmNwrDR7zzpZ7SJ--
  </code></pre>