Skip to content

cookies: Support multiple -b parameters - #6649

Closed
danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-multiple-cookies
Closed

cookies: Support multiple -b parameters#6649
danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-multiple-cookies

Conversation

@danielgustafsson

@danielgustafsson danielgustafsson commented Feb 24, 2021

Copy link
Copy Markdown
Member

Previously only a single -b cookie parameter was supported with the last one winning. This adds support for supplying multiple -b params to have them serialized semicolon separated.

This is bit of a draft PR so far which lacks tests. 

Previously only a single -b cookie parameter was supported with the last
one winning.  This adds support for supplying multiple -b params to have
them serialized semicolon separated.  Both cookiefiles and cookies can be
entered multiple times.

Closes #xxxx
Comment thread src/tool_operate.c Outdated
@danielgustafsson

Copy link
Copy Markdown
Member Author

Question is, do we want -b <filename 1> -b <filename 2> to load two files as well? I think it makes sense, not least to make -b less confusing by working the same for all possible values.

@bagder

bagder commented Feb 24, 2021

Copy link
Copy Markdown
Member

I think it makes sense and it probably makes the option easier to document/use...

@danielgustafsson

Copy link
Copy Markdown
Member Author

Pushed a rebase with support for multiple cookiefiles and some test updates.

@danielgustafsson

Copy link
Copy Markdown
Member Author

The single buildfailure in Appveyor is test 1509 which isn't related to cookies at all, likely a flake.

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be worth adding something to docs/cmdline/cookie.d too about this, but other than that I think this looks fine!

@danielgustafsson

danielgustafsson commented Feb 25, 2021 via email

Copy link
Copy Markdown
Member Author

@bagder

bagder commented Feb 25, 2021

Copy link
Copy Markdown
Member

It currently says "If this option is used several times, the last one will be used."

@curl curl locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants