]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1560: test set path containing LR or CR
authorDaniel Stenberg <daniel@haxx.se>
Sun, 30 Mar 2025 14:47:42 +0000 (16:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 30 Mar 2025 21:32:48 +0000 (23:32 +0200)
Ref: #16874
Closes #16875

tests/libtest/lib1560.c

index 9f24ff53a76ae06f0d405b774e7b9c4abf572a00..0a8b244d7686b21f99062bee2d6fbf436c01eff8 100644 (file)
@@ -875,6 +875,22 @@ static const struct setgetcase setget_parts_list[] = {
 
 /* !checksrc! disable SPACEBEFORECOMMA 1 */
 static const struct setcase set_parts_list[] = {
+  {"https://example.com/",
+   "path=one\ntwo,",
+   "https://example.com/one\ntwo",
+   0, 0, CURLUE_OK, CURLUE_OK},
+  {"https://example.com/",
+   "path=one\rtwo,",
+   "https://example.com/one\rtwo",
+   0, 0, CURLUE_OK, CURLUE_OK},
+  {"https://example.com/",
+   "path=one\ntwo,",
+   "https://example.com/one%0atwo",
+   0, CURLU_URLENCODE, CURLUE_OK, CURLUE_OK},
+  {"https://example.com/",
+   "path=one\rtwo,",
+   "https://example.com/one%0dtwo",
+   0, CURLU_URLENCODE, CURLUE_OK, CURLUE_OK},
   {"https://example.com/",
    "host=%43url.se,",
    "https://%43url.se/",