summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/fetch/h1-parsing/resources
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/fetch/h1-parsing/resources')
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/README.md6
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asisbin0 -> 546 bytes
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py4
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/message.py3
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py4
-rw-r--r--test/wpt/tests/fetch/h1-parsing/resources/status-code.py6
6 files changed, 23 insertions, 0 deletions
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/README.md b/test/wpt/tests/fetch/h1-parsing/resources/README.md
new file mode 100644
index 0000000..2175d27
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/README.md
@@ -0,0 +1,6 @@
+`blue-with-0x00-in-a-header.asis` is a copy from `../../images/blue.png` with the following prepended using Control Pictures to signify actual newlines and 0x00:
+```
+HTTP/1.1 200 AN IMAGE␍␊
+Content-Type: image/png␍␊
+Custom: ␀␍␊␍␊
+```
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis b/test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
new file mode 100644
index 0000000..102340a
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
Binary files differ
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py b/test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py
new file mode 100644
index 0000000..d91998b
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py
@@ -0,0 +1,4 @@
+def main(request, response):
+ response.headers.set(b"Content-Type", b"text/html")
+ response.headers.set(b"Custom", b"\0")
+ return b"<!doctype html><script>top.frameLoaded=true</script><b>This is a document.</b>"
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/message.py b/test/wpt/tests/fetch/h1-parsing/resources/message.py
new file mode 100644
index 0000000..640080c
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/message.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ response.writer.write(request.GET.first(b"message"))
+ response.close_connection = True
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py b/test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py
new file mode 100644
index 0000000..39f58d8
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py
@@ -0,0 +1,4 @@
+def main(request, response):
+ response.headers.set(b"Content-Type", b"text/javascript")
+ response.headers.set(b"Custom", b"\0")
+ return b"var thisIsJavaScript = 0"
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/status-code.py b/test/wpt/tests/fetch/h1-parsing/resources/status-code.py
new file mode 100644
index 0000000..5421893
--- /dev/null
+++ b/test/wpt/tests/fetch/h1-parsing/resources/status-code.py
@@ -0,0 +1,6 @@
+def main(request, response):
+ output = b"HTTP/1.1 "
+ output += request.GET.first(b"input")
+ output += b"\nheader-parsing: is sad\n"
+ response.writer.write(output)
+ response.close_connection = True