OLD | NEW |
(Empty) | |
| 1 import os.path |
| 2 |
| 3 def main(request, response): |
| 4 type = request.GET.first("type", None) |
| 5 |
| 6 body = open(os.path.join(os.path.dirname(__file__), "../../../images/blue96x
96.png"), "rb").read() |
| 7 |
| 8 response.add_required_headers = False |
| 9 response.writer.write_status(200) |
| 10 response.writer.write_header("x-content-type-options", "nosniff") |
| 11 response.writer.write_header("content-length", len(body)) |
| 12 if(type != None): |
| 13 response.writer.write_header("content-type", type) |
| 14 response.writer.end_headers() |
| 15 |
| 16 response.writer.write(body) |
OLD | NEW |