INNER CODE UNIT · Python
get_file
OWASP/Python-Honeypot · api/server.py:69
def get_file(filename):
"""
open the requested file in HTTP requests
Args:
filename: path and the filename
Returns:
content of the file or abort(404)
"""
try:
src = os.path.join(root_dir(), filename)
return open(src, 'rb').read()
except IOError:
abort(404)
def get_value_from_request(_key):