Index: third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/bad-chunk-encoding.py |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/bad-chunk-encoding.py b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/bad-chunk-encoding.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3135403863b89359d9a61a128d36f2373bb3030c |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/bad-chunk-encoding.py |
@@ -0,0 +1,13 @@ |
+import time |
+ |
+def main(request, response): |
+ delay = float(request.GET.first("ms", 1000)) / 1E3 |
+ count = int(request.GET.first("count", 50)) |
+ time.sleep(delay) |
+ response.headers.set("Transfer-Encoding", "chunked") |
+ response.write_status_headers() |
+ time.sleep(delay); |
+ for i in xrange(count): |
+ response.writer.write_content("a\r\nTEST_CHUNK\r\n") |
+ time.sleep(delay) |
+ response.writer.write_content("garbage") |