[PR #334] Implement custom cookie handling in HTTP transaction layer #256

Open
opened 2025-12-29 07:20:05 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/334
Author: @gschier
Created: 12/29/2025
Status: 🔄 Open

Base: mainHead: claude/custom-cookie-handling-MPpml


📝 Commits (7)

  • 2446367 Implement custom cookie handling in HTTP transaction layer
  • 1f9a69e Fix formatting issues
  • 93f81a8 Update Cargo.lock and fix formatting in parser.rs
  • ee19934 Treat NotPresent/Empty cookie domains as non-matching for safety
  • c78746d Fix type error: use unwrap_or_else for String
  • 43da10c Reject cookies with single-component domains (TLDs)
  • 3b78660 Remove unused get_cookies_for_url method

📊 Changes

11 files changed (+792 additions, -159 deletions)

View changed files

📝 src-tauri/Cargo.lock (+3 -67)
📝 src-tauri/Cargo.toml (+1 -3)
📝 src-tauri/src/http_request.rs (+25 -44)
📝 src-tauri/yaak-http/Cargo.toml (+3 -2)
📝 src-tauri/yaak-http/src/client.rs (+0 -8)
src-tauri/yaak-http/src/cookies.rs (+484 -0)
📝 src-tauri/yaak-http/src/lib.rs (+1 -0)
📝 src-tauri/yaak-http/src/transaction.rs (+265 -3)
📝 src-tauri/yaak-templates/src/parser.rs (+1 -3)
📝 src-tauri/yaak-ws/Cargo.toml (+1 -1)
📝 src-tauri/yaak-ws/src/commands.rs (+8 -28)

📄 Description

Remove dependency on reqwest for cookie handling by implementing custom
cookie store and management in the yaak-http crate:

  • Add new cookies.rs module with CookieStore for storing and matching
    cookies based on RFC 6265 domain/path rules
  • Update HttpTransaction to inject Cookie headers before requests and
    parse Set-Cookie headers from responses
  • Maintain cookies across redirect chains
  • Update http_request.rs to use new CookieStore instead of
    reqwest_cookie_store
  • Update WebSocket cookie handling to use new CookieStore
  • Remove reqwest_cookie_store dependency from all crates
  • Add comprehensive tests for cookie injection, parsing, and redirects

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/334 **Author:** [@gschier](https://github.com/gschier) **Created:** 12/29/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `claude/custom-cookie-handling-MPpml` --- ### 📝 Commits (7) - [`2446367`](https://github.com/mountain-loop/yaak/commit/24463673c07a5de3ba312cb42733a8941ab7304c) Implement custom cookie handling in HTTP transaction layer - [`1f9a69e`](https://github.com/mountain-loop/yaak/commit/1f9a69e1c95398e7389860ea6e266727ca614f2f) Fix formatting issues - [`93f81a8`](https://github.com/mountain-loop/yaak/commit/93f81a8e0a418c2d5cd261f8354ca545b6d82a89) Update Cargo.lock and fix formatting in parser.rs - [`ee19934`](https://github.com/mountain-loop/yaak/commit/ee19934ca869c3364cfb40a214f1395442cc04cf) Treat NotPresent/Empty cookie domains as non-matching for safety - [`c78746d`](https://github.com/mountain-loop/yaak/commit/c78746d79ea30dc63a35d8166036263a885655ff) Fix type error: use unwrap_or_else for String - [`43da10c`](https://github.com/mountain-loop/yaak/commit/43da10c2f6146ba9ffdbe8970fdf803dbde71742) Reject cookies with single-component domains (TLDs) - [`3b78660`](https://github.com/mountain-loop/yaak/commit/3b7866052b79f9a918b43257e92cdf4cf0d02d15) Remove unused get_cookies_for_url method ### 📊 Changes **11 files changed** (+792 additions, -159 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/Cargo.lock` (+3 -67) 📝 `src-tauri/Cargo.toml` (+1 -3) 📝 `src-tauri/src/http_request.rs` (+25 -44) 📝 `src-tauri/yaak-http/Cargo.toml` (+3 -2) 📝 `src-tauri/yaak-http/src/client.rs` (+0 -8) ➕ `src-tauri/yaak-http/src/cookies.rs` (+484 -0) 📝 `src-tauri/yaak-http/src/lib.rs` (+1 -0) 📝 `src-tauri/yaak-http/src/transaction.rs` (+265 -3) 📝 `src-tauri/yaak-templates/src/parser.rs` (+1 -3) 📝 `src-tauri/yaak-ws/Cargo.toml` (+1 -1) 📝 `src-tauri/yaak-ws/src/commands.rs` (+8 -28) </details> ### 📄 Description Remove dependency on reqwest for cookie handling by implementing custom cookie store and management in the yaak-http crate: - Add new cookies.rs module with CookieStore for storing and matching cookies based on RFC 6265 domain/path rules - Update HttpTransaction to inject Cookie headers before requests and parse Set-Cookie headers from responses - Maintain cookies across redirect chains - Update http_request.rs to use new CookieStore instead of reqwest_cookie_store - Update WebSocket cookie handling to use new CookieStore - Remove reqwest_cookie_store dependency from all crates - Add comprehensive tests for cookie injection, parsing, and redirects --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:20:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#256