Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --cookie option #224

Closed
wants to merge 4 commits into from
Closed

Conversation

marchellodev
Copy link
Contributor

A simple pull request that adds a --cookie flag that allows setting a cookie header in the format key1=value;key2=value

Solves #67

Copy link
Owner

@Skallwar Skallwar left a comment

Choose a reason for hiding this comment

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

Thanks for your work, I really appreciate it!

Just make sure to fix the tests (cargo test).

@@ -68,8 +70,12 @@ impl Downloader {
auth_map.insert(host, (username, password));
}

let mut headers = HeaderMap::new();
headers.insert(COOKIE, HeaderValue::from_str(cookie).unwrap());
Copy link
Owner

Choose a reason for hiding this comment

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

I fear this will not work over multiple domains, as you would always give the same cookies without taking into consideration the domains. What if 2 domains want a cookie named test?

If you have time (and want to go further with this), have a look there:

In any case this is better than what we have now so I will take this, with the modifications or not. Let me know

@Skallwar Skallwar mentioned this pull request Oct 12, 2023
@Skallwar
Copy link
Owner

Skallwar commented Oct 12, 2023

Replaced by #229
Thanks again

@Skallwar Skallwar closed this Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants