This method is really only appropriate for small files. Some explanation of what would happen with large files would be a great addition to the code or text here. (i.e., the entire file would have to be loaded into memory, and then written out to the client. the memory could only be freed once the transfer was complete) Better approaches would be some kind of chunked read/write or using an approach like sendfile() to offload copying of data from one file handle (input) to another (self.wfile)