diff options
author | Robert Brewer <fumanchu@aminus.org> | 2008-03-14 15:11:11 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2008-03-14 15:11:11 +0000 |
commit | a69a0b441447c003045b2c57c6a1e27ad603806d (patch) | |
tree | 5ee4c2a1dce2e8da2d3ca034b8225b17329b99c2 | |
parent | 0d78f3fd68b1ed390d9dac0e562edc7072131ddd (diff) | |
download | cherrypy-a69a0b441447c003045b2c57c6a1e27ad603806d.tar.gz |
Moved mimetools to only import if needed.
-rw-r--r-- | cherrypy/lib/static.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py index 0e3e28a5..a262e7e2 100644 --- a/cherrypy/lib/static.py +++ b/cherrypy/lib/static.py @@ -1,4 +1,3 @@ -import mimetools import mimetypes mimetypes.init() mimetypes.types_map['.dwg']='image/x-dwg' @@ -93,6 +92,7 @@ def serve_file(path, content_type=None, disposition=None, name=None): else: # Return a multipart/byteranges response. response.status = "206 Partial Content" + import mimetools boundary = mimetools.choose_boundary() ct = "multipart/byteranges; boundary=%s" % boundary response.headers['Content-Type'] = ct |