summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/h1-parsing/resources
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/fetch/h1-parsing/resources
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fetch/h1-parsing/resources')
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/README.md6
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asisbin0 -> 546 bytes
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py4
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/message.py3
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py4
-rw-r--r--testing/web-platform/tests/fetch/h1-parsing/resources/status-code.py6
6 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/h1-parsing/resources/README.md b/testing/web-platform/tests/fetch/h1-parsing/resources/README.md
new file mode 100644
index 0000000000..2175d27408
--- /dev/null
+++ b/testing/web-platform/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/testing/web-platform/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis b/testing/web-platform/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
new file mode 100644
index 0000000000..102340a631
--- /dev/null
+++ b/testing/web-platform/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
Binary files differ
diff --git a/testing/web-platform/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py b/testing/web-platform/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py
new file mode 100644
index 0000000000..d91998b998
--- /dev/null
+++ b/testing/web-platform/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/testing/web-platform/tests/fetch/h1-parsing/resources/message.py b/testing/web-platform/tests/fetch/h1-parsing/resources/message.py
new file mode 100644
index 0000000000..640080c18b
--- /dev/null
+++ b/testing/web-platform/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/testing/web-platform/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py b/testing/web-platform/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py
new file mode 100644
index 0000000000..39f58d8270
--- /dev/null
+++ b/testing/web-platform/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/testing/web-platform/tests/fetch/h1-parsing/resources/status-code.py b/testing/web-platform/tests/fetch/h1-parsing/resources/status-code.py
new file mode 100644
index 0000000000..5421893b26
--- /dev/null
+++ b/testing/web-platform/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