Compare commits
No commits in common. "56e0c2391d6a2ca52b4354e3f66dcf62d350125d" and "f6d641eeefdbdbb39fc03ccd53cdd5cec54ccaa3" have entirely different histories.
56e0c2391d
...
f6d641eeef
|
@ -21,8 +21,6 @@ import re
|
||||||
import lxml.etree
|
import lxml.etree
|
||||||
|
|
||||||
import cgitb
|
import cgitb
|
||||||
import wsgiref.util
|
|
||||||
import mimetypes
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# python 2
|
# python 2
|
||||||
|
@ -182,7 +180,7 @@ def cgi_file_handler(environ, start_response, app):
|
||||||
# file successfully open
|
# file successfully open
|
||||||
headers = {}
|
headers = {}
|
||||||
headers['status'] = '200 OK'
|
headers['status'] = '200 OK'
|
||||||
headers['content-type'] = mimetypes.guess_type(path)[0] or 'application/octet-stream'
|
headers['content-type'] = mimetypes.guess_type(path)[0]
|
||||||
start_response(headers['status'], list(headers.items()))
|
start_response(headers['status'], list(headers.items()))
|
||||||
return wsgiref.util.FileWrapper(f)
|
return wsgiref.util.FileWrapper(f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue