Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/nosniff/resources/image.py

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698