mirror of
https://github.com/curl/curl.git
synced 2025-04-18 16:30:45 +08:00
test391: verify --path-as-is with redirect
This commit is contained in:
parent
ae8a329e81
commit
5394cbf570
@ -64,7 +64,7 @@ test361 test362 test363 test364 test365 test366 test367 test368 test369 \
|
||||
test370 test371 test372 test373 test374 test375 test376 test378 test379 \
|
||||
test380 test381 test383 test384 test385 test386 \
|
||||
\
|
||||
test392 test393 test394 test395 test396 test397 test398 \
|
||||
test391 test392 test393 test394 test395 test396 test397 test398 \
|
||||
\
|
||||
test400 test401 test402 test403 test404 test405 test406 test407 test408 \
|
||||
test409 test410 test411 test412 test413 test414 \
|
||||
|
72
tests/data/test391
Normal file
72
tests/data/test391
Normal file
@ -0,0 +1,72 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
--path-as-is
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 301 OK
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
Location: ../%TESTNUMBER0002
|
||||
|
||||
-foo-
|
||||
</data>
|
||||
<data2>
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
|
||||
-muu-
|
||||
</data2>
|
||||
<datacheck>
|
||||
HTTP/1.1 301 OK
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
Location: ../%TESTNUMBER0002
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 6
|
||||
Content-Type: text/html
|
||||
|
||||
-muu-
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
--path-as-is with redirect, keeping dotdots
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/../../%TESTNUMBER --path-as-is -L
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
GET /../../%TESTNUMBER HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
GET /../%TESTNUMBER0002 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
Loading…
x
Reference in New Issue
Block a user