Use new email module names (#1637162, #1637159, #1637157).

This commit is contained in:
Georg Brandl 2007-01-22 19:40:21 +00:00
parent dd7b0525e9
commit 5a096e1b10
6 changed files with 28 additions and 28 deletions

View file

@ -1209,14 +1209,14 @@ class FileHandler(BaseHandler):
# not entirely sure what the rules are here
def open_local_file(self, req):
import email.Utils
import email.utils
import mimetypes
host = req.get_host()
file = req.get_selector()
localfile = url2pathname(file)
stats = os.stat(localfile)
size = stats.st_size
modified = email.Utils.formatdate(stats.st_mtime, usegmt=True)
modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
mtype = mimetypes.guess_type(file)[0]
headers = mimetools.Message(StringIO(
'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %