← Commit list

dc739fee16

pojomi
pojomi
2026-01-05
SUCCESS Duration: 254s

Subject

config2setopts: add space in cookie header with multiple -b

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/config2setopts.c+2 -2
@@ -547,8 +547,8 @@ static CURLcode cookie_setopts(struct OperationConfig *config, CURL *curl)
if(cl == config->cookies)
result = curlx_dyn_add(&cookies, cl->data);
else
- result = curlx_dyn_addf(&cookies, ";%s", cl->data);
-
+ result = curlx_dyn_addf(&cookies, ";%s%s",
+ ISBLANK(cl->data[0]) ? "" : " ", cl->data);
if(result) {
warnf("skipped provided cookie, the cookie header "
"would go over %u bytes", MAX_COOKIE_LINE);
tests/data/test6+1 -1
@@ -44,7 +44,7 @@ GET /we/want/that/page/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
-Cookie: name=contents;name2=content2;name3=content3
+Cookie: name=contents;name2=content2; name3=content3
</protocol>
</verify>