title: Postman and content-length
body: <p>From my laptop I initiated a POST request to my web server. The HTTP POST request looks something like this (when seen via POSTMAN console)</p>
  
  <pre><code>POST /api/fwupgrade HTTP/1.1
  User-Agent: PostmanRuntime/7.24.1
  Accept: */*
  Cache-Control: no-cache
  Postman-Token: 2b1e72fa-f43b-4fc9-9058-e78533c30f0f
  Host: 192.168.71.24
  Accept-Encoding: gzip, deflate, br
  Connection: keep-alive
  Content-Type: multipart/form-data; boundary=--------------------------572971355726244237076370
  Content-Length: 222
  ----------------------------572971355726244237076370
  Content-Disposition: form-data; name="FileName"; filename="help.txt"
  
  &lt;help.txt&gt;
  </code></pre>
  
  <p>The content-length is indicated as 222. the file help.txt has the following characters only (for test I put 10 a)
  aaaaaaaaaa</p>
  
  <p>When I receive a http request on the server, I parse the request and I see the content-length as 222. Now my questions:</p>
  
  <p>a) I assume this content length 222 includes the bytes after the line "Content-Length: 222" am I right? So this would mean the request body starts from </p>
  
  <pre><code> ------------------572971355726244237076370
      Content-Disposition: form-data; name="FileName"; filename="help.txt"
  
      &lt;help.txt&gt;
  </code></pre>
  
  <p>Is this understanding correct?</p>
  
  <p>b) Does the request body always follow the same format i.e after "Content-Length:" it begins and ends with the data of the file, in my case "help.txt"?</p>
  
  <p>c) Assuming #a is correct, I calculate the actual data to be starting from the location after filename="help.txt" /r/n and then store this in a file on my server. However I get 58 surplus bytes after the aaaaaaaaaa. Any idea how am I supposed to interpret Content-length or how postman calculates the Content-length field?</p>
  
  <p>Regards</p>