Skip to content

Commit 5394cbf

Browse files
committed
test391: verify --path-as-is with redirect
1 parent ae8a329 commit 5394cbf

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

tests/data/Makefile.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test361 test362 test363 test364 test365 test366 test367 test368 test369 \
6464
test370 test371 test372 test373 test374 test375 test376 test378 test379 \
6565
test380 test381 test383 test384 test385 test386 \
6666
\
67-
test392 test393 test394 test395 test396 test397 test398 \
67+
test391 test392 test393 test394 test395 test396 test397 test398 \
6868
\
6969
test400 test401 test402 test403 test404 test405 test406 test407 test408 \
7070
test409 test410 test411 test412 test413 test414 \

tests/data/test391

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<testcase>
2+
<info>
3+
<keywords>
4+
HTTP
5+
HTTP GET
6+
--path-as-is
7+
</keywords>
8+
</info>
9+
10+
#
11+
# Server-side
12+
<reply>
13+
<data>
14+
HTTP/1.1 301 OK
15+
Content-Length: 6
16+
Content-Type: text/html
17+
Location: ../%TESTNUMBER0002
18+
19+
-foo-
20+
</data>
21+
<data2>
22+
HTTP/1.1 200 OK
23+
Content-Length: 6
24+
Content-Type: text/html
25+
26+
-muu-
27+
</data2>
28+
<datacheck>
29+
HTTP/1.1 301 OK
30+
Content-Length: 6
31+
Content-Type: text/html
32+
Location: ../%TESTNUMBER0002
33+
34+
HTTP/1.1 200 OK
35+
Content-Length: 6
36+
Content-Type: text/html
37+
38+
-muu-
39+
</datacheck>
40+
</reply>
41+
42+
#
43+
# Client-side
44+
<client>
45+
<server>
46+
http
47+
</server>
48+
<name>
49+
--path-as-is with redirect, keeping dotdots
50+
</name>
51+
<command>
52+
http://%HOSTIP:%HTTPPORT/../../%TESTNUMBER --path-as-is -L
53+
</command>
54+
</client>
55+
56+
#
57+
# Verify data after the test has been "shot"
58+
<verify>
59+
<protocol>
60+
GET /../../%TESTNUMBER HTTP/1.1
61+
Host: %HOSTIP:%HTTPPORT
62+
User-Agent: curl/%VERSION
63+
Accept: */*
64+
65+
GET /../%TESTNUMBER0002 HTTP/1.1
66+
Host: %HOSTIP:%HTTPPORT
67+
User-Agent: curl/%VERSION
68+
Accept: */*
69+
70+
</protocol>
71+
</verify>
72+
</testcase>

0 commit comments

Comments
 (0)