Skip to content

Commit 9a7a28c

Browse files
committed
Bug 1606798 [wpt PR 21019] - HTTP: 0x00 in a header value, a=testonly
Automatic update from web-platform-tests HTTP: 0x00 in a header value Tests to complement those written in web-platform-tests/wpt#10424. -- wpt-commits: 38ecde806a5f1710d9e5beba700cef7352f7570e wpt-pr: 21019 UltraBlame original commit: 2df4f38122005c353cf34c665c293fcb975fbdb7
1 parent 307d442 commit 9a7a28c

6 files changed

+632
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
async_test
2+
(
3+
t
4+
=
5+
>
6+
{
7+
const
8+
script
9+
=
10+
document
11+
.
12+
createElement
13+
(
14+
"
15+
script
16+
"
17+
)
18+
;
19+
t
20+
.
21+
add_cleanup
22+
(
23+
(
24+
)
25+
=
26+
>
27+
script
28+
.
29+
remove
30+
(
31+
)
32+
)
33+
;
34+
script
35+
.
36+
src
37+
=
38+
"
39+
resources
40+
/
41+
script
42+
-
43+
with
44+
-
45+
0x00
46+
-
47+
in
48+
-
49+
header
50+
.
51+
py
52+
"
53+
;
54+
script
55+
.
56+
onerror
57+
=
58+
t
59+
.
60+
step_func_done
61+
(
62+
)
63+
;
64+
script
65+
.
66+
onload
67+
=
68+
t
69+
.
70+
unreached_func
71+
(
72+
)
73+
;
74+
document
75+
.
76+
body
77+
.
78+
append
79+
(
80+
script
81+
)
82+
;
83+
}
84+
"
85+
Expect
86+
network
87+
error
88+
for
89+
script
90+
with
91+
0x00
92+
in
93+
a
94+
header
95+
"
96+
)
97+
;
98+
async_test
99+
(
100+
t
101+
=
102+
>
103+
{
104+
const
105+
frame
106+
=
107+
document
108+
.
109+
createElement
110+
(
111+
"
112+
iframe
113+
"
114+
)
115+
;
116+
t
117+
.
118+
add_cleanup
119+
(
120+
(
121+
)
122+
=
123+
>
124+
frame
125+
.
126+
remove
127+
(
128+
)
129+
)
130+
;
131+
frame
132+
.
133+
src
134+
=
135+
"
136+
resources
137+
/
138+
document
139+
-
140+
with
141+
-
142+
0x00
143+
-
144+
in
145+
-
146+
header
147+
.
148+
py
149+
"
150+
;
151+
t
152+
.
153+
step_timeout
154+
(
155+
(
156+
)
157+
=
158+
>
159+
{
160+
assert_equals
161+
(
162+
frame
163+
.
164+
contentDocument
165+
null
166+
)
167+
;
168+
t
169+
.
170+
done
171+
(
172+
)
173+
;
174+
}
175+
1000
176+
)
177+
;
178+
document
179+
.
180+
body
181+
.
182+
append
183+
(
184+
frame
185+
)
186+
;
187+
}
188+
"
189+
Expect
190+
network
191+
error
192+
for
193+
frame
194+
navigation
195+
to
196+
resource
197+
with
198+
0x00
199+
in
200+
a
201+
header
202+
"
203+
)
204+
;
205+
async_test
206+
(
207+
t
208+
=
209+
>
210+
{
211+
const
212+
img
213+
=
214+
document
215+
.
216+
createElement
217+
(
218+
"
219+
img
220+
"
221+
)
222+
;
223+
t
224+
.
225+
add_cleanup
226+
(
227+
(
228+
)
229+
=
230+
>
231+
img
232+
.
233+
remove
234+
(
235+
)
236+
)
237+
;
238+
img
239+
.
240+
src
241+
=
242+
"
243+
resources
244+
/
245+
blue
246+
-
247+
with
248+
-
249+
0x00
250+
-
251+
in
252+
-
253+
a
254+
-
255+
header
256+
.
257+
asis
258+
"
259+
;
260+
img
261+
.
262+
onerror
263+
=
264+
t
265+
.
266+
step_func_done
267+
(
268+
)
269+
;
270+
img
271+
.
272+
onload
273+
=
274+
t
275+
.
276+
unreached_func
277+
(
278+
)
279+
;
280+
document
281+
.
282+
body
283+
.
284+
append
285+
(
286+
img
287+
)
288+
;
289+
}
290+
"
291+
Expect
292+
network
293+
error
294+
for
295+
image
296+
with
297+
0x00
298+
in
299+
a
300+
header
301+
"
302+
)
303+
;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
blue
2+
-
3+
with
4+
-
5+
0x00
6+
-
7+
in
8+
-
9+
a
10+
-
11+
header
12+
.
13+
asis
14+
is
15+
a
16+
copy
17+
from
18+
.
19+
.
20+
/
21+
.
22+
.
23+
/
24+
images
25+
/
26+
blue
27+
.
28+
png
29+
with
30+
the
31+
following
32+
prepended
33+
using
34+
Control
35+
Pictures
36+
to
37+
signify
38+
actual
39+
newlines
40+
and
41+
0x00
42+
:
43+
HTTP
44+
/
45+
1
46+
.
47+
1
48+
200
49+
AN
50+
IMAGE
51+
Content
52+
-
53+
Type
54+
:
55+
image
56+
/
57+
png
58+
Custom
59+
:

0 commit comments

Comments
 (0)