OLD | NEW |
(Empty) | |
| 1 def main(request, response): |
| 2 outcome = request.GET.first("outcome", "f") |
| 3 type = request.GET.first("type", "Content-Type missing") |
| 4 |
| 5 content = "// nothing to see here" |
| 6 content += "\n" |
| 7 content += "log('FAIL: " + type + "')" if (outcome == "f") else "p()" |
| 8 |
| 9 response.add_required_headers = False |
| 10 response.writer.write_status(200) |
| 11 response.writer.write_header("x-content-type-options", "nosniff") |
| 12 response.writer.write_header("content-length", len(content)) |
| 13 if(type != "Content-Type missing"): |
| 14 response.writer.write_header("content-type", type) |
| 15 response.writer.end_headers() |
| 16 |
| 17 response.writer.write(content) |
OLD | NEW |