From: Daniel Stenberg Date: Tue, 7 Jun 2022 21:26:59 +0000 (+0200) Subject: test391: verify --path-as-is with redirect X-Git-Tag: curl-7_84_0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5394cbf570cda0510d6f10bd875e9aba9f898ce4;p=thirdparty%2Fcurl.git test391: verify --path-as-is with redirect --- diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 2196e2fd97..d41052e539 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -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 \ diff --git a/tests/data/test391 b/tests/data/test391 new file mode 100644 index 0000000000..1eff2ef3eb --- /dev/null +++ b/tests/data/test391 @@ -0,0 +1,72 @@ + + + +HTTP +HTTP GET +--path-as-is + + + +# +# Server-side + + +HTTP/1.1 301 OK +Content-Length: 6 +Content-Type: text/html +Location: ../%TESTNUMBER0002 + +-foo- + + +HTTP/1.1 200 OK +Content-Length: 6 +Content-Type: text/html + +-muu- + + +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- + + + +# +# Client-side + + +http + + +--path-as-is with redirect, keeping dotdots + + +http://%HOSTIP:%HTTPPORT/../../%TESTNUMBER --path-as-is -L + + + +# +# Verify data after the test has been "shot" + + +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: */* + + + +