So, I\'m uploading a file, and then downloading it... but the Content-Length in the upload headers do not match the file size. I\'m guessing there is some other data involve
I think that each section of the multipart/form-data request counts toward the overall size of the main Content-Length header.
Found this as a reference: http://chxo.com/be2/20050724_93bf.html
So, perhaps after your headers, you might have:
----WebKitFormBoundaryeoFyqD4zr6smwYDG
Content-Disposition: form-data; name="file"; filename="testfile-downloaded.zip"; size=
Content-Length:
----WebKitFormBoundaryeoFyqD4zr6smwYDG
All of which would count toward the Content-Length size.
EDIT
Just realized I didn't answer your question. Not sure how to pull out the file size from the file section of the request. Sorry!