Skip to content

Parse cookie header pairs. - #119

Merged
ioquatix merged 2 commits into
mainfrom
parse-cookie-header-pairs
Aug 17, 2026
Merged

Parse cookie header pairs.#119
ioquatix merged 2 commits into
mainfrom
parse-cookie-header-pairs

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

Parse each semicolon-separated pair in Cookie header fields as an independent cookie. This keeps request Cookie semantics distinct from Set-Cookie attributes.

Tests

  • bundle exec bake test
  • bundle exec rubocop lib/protocol/http/header/cookie.rb test/protocol/http/header/cookie.rb

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Parses each semicolon-separated request cookie independently while preserving Set-Cookie attribute semantics.

Changes:

  • Split Cookie fields into individual cookie pairs.
  • Add coverage for whitespace, duplicates, empty values, and multiple fields.
  • Verify Set-Cookie attributes remain intact.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/protocol/http/header/cookie.rb Parses each cookie pair independently.
test/protocol/http/header/cookie.rb Tests request cookie parsing behavior.
test/protocol/http/header/set_cookie.rb Tests separate response-cookie semantics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ioquatix
ioquatix merged commit 3f41475 into main Aug 17, 2026
35 of 41 checks passed
@ioquatix
ioquatix deleted the parse-cookie-header-pairs branch August 17, 2026 04:14
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.

3 participants