I think some of your responses aren't quite right. For example, in response to the first PUT, you have:<p><pre><code> HTTP/1.1 200 Ok
Range: bytes=0-99
Content-Length: 0
</code></pre>
But the Range header surely can't be used here, since it's a request header and this is a response. A Content-Range header wouldn't be any more appropriate, since you're not actually returning any content (of any amount). Do you really need this info in the response anyway? The sender knows what they sent, and either it was entirely successful (a 2xx response) or it wasn't.<p>Also, if you're going to return a zero-length 200 response, you might as well use 204 No Content instead.<p>Then, when resuming an upload, you send a HEAD that returns the following:<p><pre><code> HTTP/1.1 200 Ok
Content-Length: 100
Content-Type: image/jpg
Content-Disposition: attachment; filename="cat.jpg"'
Range: bytes=0-69
</code></pre>
Again, you can't use the Range request header in a response. And the Content-Length should surely be 70, since that's how much content would be returned if this was a GET request. You could possibly include a Content-Range of 0-69/100 if the server wanted to communicate the expected file size, but I'm not convinced that's necessary and seems something of an abuse of that header.<p>Finally, the response to the resumed PUT has the same problems as the first PUT response. It should probably just be a 204 No Content response - no Content-Length or Range headers required.