server: Implement Server._get_file
It would be nice to use sendfile to copy between the HTTPResponse
object [1] and the cache file. Linux supports arbitrary files (not
just sockets) for out_fd since 2.6.33, so the "to the cache file" side
works. However, from sendfile(2) [2]:
The in_fd argument must correspond to a file which supports
mmap(2)-like operations (i.e., it cannot be a socket).
So reading from the HTTPResponse is not going to happen (yet). Once
Linux gains support for socket in_fd, we could use something like:
_os.sendfile(
f.fileno(), response.fileno(), offset=None, count=content_length)
[1]: http://docs.python.org/3/library/http.client.html#httpresponse-objects
[2]: http://man7.org/linux/man-pages/man2/sendfile.2.html