Make serving static files a bit more efficient
This commit is contained in:
parent
f48fc32cf0
commit
f08b19e54e
|
@ -328,7 +328,7 @@ Create boxes and more with a laser cutter!
|
||||||
start_response("200 OK", [('Content-type', "%s; charset=%s" % (type_, encoding))])
|
start_response("200 OK", [('Content-type', "%s; charset=%s" % (type_, encoding))])
|
||||||
|
|
||||||
f = open(path, 'rb')
|
f = open(path, 'rb')
|
||||||
return f
|
return environ['wsgi.file_wrapper'](f, 512*1024)
|
||||||
|
|
||||||
def serve(self, environ, start_response):
|
def serve(self, environ, start_response):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue