Skip to content

Merge scrape CLI cookies through cookie jar#368

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-scrape-cookie-redirect-jar
Open

Merge scrape CLI cookies through cookie jar#368
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-scrape-cookie-redirect-jar

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • seed cortex scrape --cookie values into the reqwest cookie jar instead of forcing a fixed Cookie header
  • allow redirect Set-Cookie values to merge with CLI-provided cookies on subsequent same-origin hops
  • fix a stale test import so the affected crate tests compile on current main

Fixes PlatformNetwork/bounty-challenge#53006

Tests

  • cargo fmt --package cortex-cli --check
  • cargo test --package cortex-cli scrape_cmd::command::tests::test_cli_cookies_merge_with_redirect_set_cookies -- --nocapture
  • cargo test --package cortex-cli scrape_cmd::tests -- --nocapture
  • cargo check --package cortex-cli --lib
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] cortex scrape --cookie: manual Cookie header wins over jar on redirects — Set-Cookie from 302 lost

1 participant