]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test427: verify sending more cookies than fit in a 8190 bytes line
authorDaniel Stenberg <daniel@haxx.se>
Mon, 12 Jun 2023 07:00:21 +0000 (09:00 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Jun 2023 12:15:37 +0000 (14:15 +0200)
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

tests/data/Makefile.inc
tests/data/test427 [new file with mode: 0644]

index 91f2275a9897bfe5f43f8c5f347db61b53143605..b5c7ae77811eb965c75d6c885de3f61cd4ff794d 100644 (file)
@@ -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 (file)
index 0000000..e99f215
--- /dev/null
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data crlf="yes" nocheck="yes">
+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-
+</data>
+
+<data2 crlf="yes">
+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-
+</data2>
+
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Keep Cookie: header within 8190 bytes
+</name>
+
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c %LOGDIR/cookies%TESTNUMBER -L
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol crlf="yes">
+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]%
+
+</protocol>
+</verify>
+</testcase>