I have a server and sometimes when client ask for a file and if its request header Range may get over the length of file, so the server returns 416 status code. But I'm wondering should it write file content too ? or simply return 416 with no content ?
Explaination on W3 Website doesn't clearify enough.
What I understood from the W3 web, that it should write Content-Range header(starting with 0?). So if content length is 10 bytes. The response should look like
HTTP/1.1 416 Content-Range: bytes 0-9/10 Content-Length: 10 [10 bytes FILE CONTENT HERE]