-
-
Notifications
You must be signed in to change notification settings - Fork 439
Open
Description
Summary
If I have multiple cookies for a domain in a cookies file provided via -C, only one of them appears to get sent.
Reproduction
Create cookies.txt:
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
localhost TRUE / FALSE 1793197913 test_cookie1 one
localhost TRUE / FALSE 1793197913 test_cookie2 two
Run httpbin:
$ podman run -p 8000:80 kennethreitz/httpbin
Run monolith against that httpbin instance, and observe only a single value in the Cookie header:
$ monolith -C cookies.txt http://localhost:8000/headers
http://localhost:8000/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, br, deflate",
"Cookie": "test_cookie2=two",
"Host": "localhost:8000",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
}
}
Suspected Cause
I believe the issue is the use of insert instead of append here:
Line 152 in 8702e66
| .insert(COOKIE, HeaderValue::from_str(&cookie_header_value).unwrap()); |
Metadata
Metadata
Assignees
Labels
No labels