I need to read responses from user provided URLs
I don't want them to overload my server with links to huge files.
I want to read N bytes max and return an error if there are more bytes to read.
I can read N bytes, but how I detect, that file is incomplete (assuming corner cases when remote file is exactly N bytes long)?