From: Daniel Stenberg Date: Mon, 12 Jun 2023 07:00:21 +0000 (+0200) Subject: test427: verify sending more cookies than fit in a 8190 bytes line X-Git-Tag: curl-8_2_0~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c25cd45087cf36c23e265f5c99d49b4a5e8e012;p=thirdparty%2Fcurl.git test427: verify sending more cookies than fit in a 8190 bytes line curl will then only populate the header with cookies that fit, dropping ones that otherwise would have been sent Ref: https://curl.se/mail/lib-2023-06/0020.html Closes #11303 --- diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 91f2275a98..b5c7ae7781 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -69,7 +69,7 @@ test390 test391 test392 test393 test394 test395 test396 test397 test398 \ test399 test400 test401 test402 test403 test404 test405 test406 test407 \ test408 test409 test410 test411 test412 test413 test414 test415 test416 \ test417 test418 test419 test420 test421 test422 test423 test424 test425 \ -test426 \ +test426 test427 \ test430 test431 test432 test433 test434 test435 test436 \ \ test440 test441 test442 test443 test444 test445 test446 test447 \ diff --git a/tests/data/test427 b/tests/data/test427 new file mode 100644 index 0000000000..e99f21518a --- /dev/null +++ b/tests/data/test427 @@ -0,0 +1,72 @@ + + + +HTTP +HTTP GET + + + +# +# Server-side + + +HTTP/1.1 301 move along +Date: Tue, 09 Nov 2010 14:49:00 GMT +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Set-Cookie: long1=%repeat[400 x abcdefgh]%; path="/" +Set-Cookie: long2=%repeat[400 x abcdefgh]%; path="/" +Set-Cookie: long3=%repeat[400 x abcdefgh]%; path="/" +Location: %TESTNUMBER0002 + +-foo- + + + +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html + +-foo- + + + + +# +# Client-side + + +http + + +Keep Cookie: header within 8190 bytes + + + +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c %LOGDIR/cookies%TESTNUMBER -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: */* +Cookie: long3=%repeat[400 x abcdefgh]%; long2=%repeat[400 x abcdefgh]% + + + +