PackageTrack
Sign in Get early access

cookie

HTTP cookie parsing and cookie jar management. Supports signed and private (encrypted, authenticated) jars.

0.18.2 215M downloads/mo #472 most downloaded on crates.io SergioBenitez/cookie-rs

What this package is like to depend on

Last release 15 days ago

08 Aug 2026

Release timing varies

gaps range from 2 weeks to 2.4 years

Rarely documented

notes for 17 of 76 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

78 releases · first in 2014

1 release in the last 12 months

see the full history below

Release timeline

78 releases · Nov 2014 to Aug 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 78
  1. 0.18.2 08 Aug 2026
    Release notes

    Changes and Fixes

    • Stopped using internal time APIs.

    • Expires parsing is more RFC 6265-compliant.

      • Weekday prefixes are now optional.
      • Two-digit years follow the RFC boundary: 69 is 2069 (not 1969).
    • The manifest now declares rust-version = "1.56".

    Open source →
  2. 0.18.1 25 Mar 2024
    Release notes

    New Features

    • Added support for the draft Partitioned attribute.

      The new CookieBuilder::partition(), Cookie::partitioned(), and Cookie::set_partitioned() methods allow enabling and/or disabling the attribute. Additionally, the attribute is recognized during parsing.

    • Added CookieBuilder::removal(), counterpart to Cookie::make_removal().

    Open source →
  3. 0.18.0 09 Oct 2023
    Release notes

    Breaking Changes

    • The MSRV is now 1.56.

    • Cookie::value() no longer trims surrounding double quotes. (89eddd)

      Use Cookie::value_trimmed() for the previous behavior.

    • Many methods now expect a T: Into<Cookie> in place of Cookie. (49ff7b)

      Functions and methods that previously accepted a Cookie now accept any T: Into<Cookie>. This particularly affects the CookieJar API, which now allows simpler addition and removal of cookies:

      • jar.add(("foo", "bar"));
      • jar.add(Cookie::build(("foo", "bar")).path("/"));
      • jar.remove("foo");
      • jar.remove(Cookie::build("foo").path("/"));
    • CookieJar::force_remove() now expects a T: AsRef<str> in place of &Cookie.

      Force-removal never requires more information than a cookie's name. The API has been simplified to reflect this.

    • CookieBuilder::finish() was deprecated in favor of CookieBuilder::build().

      This largely serves as a compile-time notice that calling finish() or build() is largely unnecessary given that CookieBuilder implements Into<Cookie>.

    • Cookie::named() was deprecated in favor of using Cookie::build() or Cookie::from().

      • Cookie::named("foo") is equivalent to Cookie::from("foo").
      • Cookie::build("foo") begins building a cookie equivalent to Cookie::named("foo").

    New Features

    • Added Cookie::value_trimmed() and Cookie::name_value_trimmed().

      These versions of Cookie::value() and Cookie::name_value(), respectively, trim a matching pair of surrounding double quotes from the cookie's value, if any are present.

    • String-like types, tuples of string-like types, and CookieBuilder implement Into<Cookie>.

      Implementations of Into<Cookie> for string-like types (&str, String, Cow<str>), tuples of string-like types (name: string, value: string), and CookieBuilder were added. The former implementations create a cookie with a name corresponding to the string and an empty value. The tuple implementation creates a cookie with the given name and value strings. The CookieBuilder implementation returns the built cookie.

    • Key implements Debug.

      To not leak sensitive information, the representation is simply "Key".

    • CookieBuilder implements Borrow{Mut}<Cookie>, As{Ref,Mut}<Cookie>, Display.

    • Added CookieBuilder::inner{_mut}() to (mutably) borrow cookies being built.

    • Added PrefixedJar and CookieJar::prefixed{_mut}(), which implement the cookie prefixes HTTP draft.

    Open source →
  4. 0.18.0-rc.0 27 Sep 2023 pre-release

    Nothing published for this version

  5. 0.17.0 23 Jan 2023
    Release notes

    Breaking Changes

    • Cookie parsing no longer removes a . Domain prefix. Cookie::domain() now removes a . prefix before returning.

      As these changes are inverses, they are not likely observable. The change only affects manually set domain values via the .domain() builder method, the set_domain() setter method, or similar, which will now have a prefix of . removed when returned by Cookie::domain(). This results in more consistent treatment of Domain values.

    New Features

    • Added Cookie::split_parse() and Cookie::split_parse_encoded() methods.

      The methods split a ;-joined cookie string and parse/decode the split values. They return a newly introduced iterator value of type SplitCookies over the parse results.

    General Changes and Fixes

    • Parsing fuzzers were introduced and run for 48 CPU hours without failure.
    • base64 was updated to 0.21.

    Version 0.16

    Open source →
  6. 0.16.2 16 Dec 2022
    Release notes

    General Changes

    • base64 was updated to 0.20.
    Open source →
  7. 0.16.1 26 Sep 2022
    Release notes

    Changes and Fixes

    • The ,, (, and ) are percent-encoded/decoded when encoding is used.
    • The aes-gcm dependency was updated to 0.10.
    Open source →
  8. 0.16.0 29 Dec 2021
    Release notes

    Breaking Changes

    • The MSRV is now 1.53, up from 1.41 in 0.15.
    • time has been updated to 0.3 and is reexported from the crate root.

    General Changes

    • rust-crypto dependencies were updated to their latest versions.

    Version 0.15

    Open source →
  9. 0.16.0-rc.1 19 Aug 2021 pre-release
    Release notes

    New release candidate version: 0.16.0-rc.1.

    Open source →
  10. 0.15.2 26 Sep 2022

    Nothing published for this version

  11. 0.15.1 14 Jul 2021
    Release notes

    Changes and Fixes

    • A panic that could result from non-char boundary indexing was fixed.
    • Stale doc references to version 0.14 were updated.
    Open source →
  12. 0.15.0 25 Feb 2021
    Release notes

    Breaking Changes

    • Cookie::force_remove() takes &Cookie instead of Cookie.
    • Child jar methods split into immutable and mutable versions (Cookie::{private{_mut}, signed{_mut}}).
    • Cookie::encoded() returns a new Display struct.
    • Dates with year <= 99 are handled like Chrome: range 0..=68 maps to 2000..=2068, 69..=99 to 1969..=1999.
    • Cookie::{set_}expires() operates on a new Expiration enum.

    New Features

    • Added Cookie::make_removal() to manually create expired cookies.
    • Added Cookie::stripped() display variant to print only the name and value of a cookie.
    • Key implements a constant-time PartialEq.
    • Added Key::master() to retrieve the full 512-bit master key.
    • Added PrivateJar::decrypt() to manually decrypt an encrypted Cookie.
    • Added SignedJar::verify() to manually verify a signed Cookie.
    • Cookie::expires() returns an Option<Expiration> to allow distinguishing between unset and None expirations.
    • Added Cookie::expires_datetime() to retrieve the expiration as an OffsetDateTime.
    • Added Cookie::unset_expires() to unset expirations.

    General Changes and Fixes

    • MSRV is 1.41.

    Version 0.14

    Open source →
  13. 0.14.4 02 Mar 2021

    Nothing published for this version

  14. 0.14.3 06 Nov 2020
    Release notes

    Changes and Fixes

    • rust-crypto dependencies were updated to their latest versions.
    Open source →
  15. 0.14.2 22 Jul 2020
    Release notes

    Changes and Fixes

    • Documentation now builds on the stable channel.
    • rust-crypto dependencies were updated to their latest versions.
    • Fixed 'interator' -> 'iterator' documentation typo.
    Open source →
  16. 0.14.1 05 Jun 2020
    Release notes

    Changes and Fixes

    • Updated base64 dependency to 0.12.
    • Updated minimum time dependency to correct version: 0.2.11.
    • Added readme key to Cargo.toml, updated license field.
    Open source →
  17. 0.14.0 29 May 2020
    Release notes

    Breaking Changes

    • The Key::from_master() method was deprecated in favor of the more aptly named Key::derive_from().
    • The deprecated CookieJar::clear() method was removed.

    New Features

    • Added Key::from() to create a Key structure from a full-length key.
    • Signed and private cookie jars can be individually enabled via the new signed and private features, respectively.
    • Key derivation via key expansion can be individually enabled via the new key-expansion feature.

    General Changes and Fixes

    • ring is no longer a dependency: RustCrypto-based cryptography is used in lieu of ring. Prior to their inclusion here, the hmac and hkdf crates were audited.
    • Quotes, if present, are stripped from cookie values when parsing.

    Version 0.13

    Open source →
  18. 0.13.3 03 Feb 2020
    Release notes

    Changes

    • The time dependency was unpinned from 0.2.4, allowing any 0.2.x version of time where x >= 6.
    Open source →
  19. 0.13.2 28 Jan 2020
    Release notes

    Changes

    • The time dependency was pinned to 0.2.4 due to upstream breaking changes in 0.2.5.
    Open source →
  20. 0.13.1 24 Jan 2020
    Release notes

    New Features

    • Added the CookieJar::reset_delta() method, which reverts all delta changes to a CookieJar.
    Open source →
  21. 0.13.0 21 Jan 2020
    Release notes

    Breaking Changes

    • time was updated from 0.1 to 0.2.
    • ring was updated from 0.14 to 0.16.
    • SameSite::None now writes SameSite=None to correspond with updated SameSite draft. SameSite can be unset by passing None to Cookie::set_same_site().
    • CookieBuilder gained a lifetime: CookieBuilder<'c>.

    General Changes and Fixes

    • Added a CHANGELOG.
    • expires, max_age, path, and domain can be unset by passing None to the respective Cookie::set_{field}() method.
    • The "Expires" field is limited to a date-time of Dec 31, 9999, 23:59:59.
    • The % character is now properly encoded and decoded.
    • Constructor methods on CookieBuilder allow non-static lifetimes.
    Open source →
  22. 0.12.0 02 May 2019

    Nothing published for this version

  23. 0.11.5 26 Sep 2022

    Nothing published for this version

  24. 0.11.4 02 Mar 2021

    Nothing published for this version

  25. 0.11.3 29 May 2020

    Nothing published for this version

  26. 0.11.2 28 Jan 2020

    Nothing published for this version

  27. 0.11.1 02 May 2019

    Nothing published for this version

  28. 0.11.0 25 Jul 2018

    Nothing published for this version

  29. 0.10.1 10 Oct 2017

    Nothing published for this version

  30. 0.10.0 31 Aug 2017

    Nothing published for this version

  31. 0.9.2 10 Oct 2017

    Nothing published for this version

  32. 0.9.1 17 Jun 2017

    Nothing published for this version

  33. 0.9.0 15 Jun 2017

    Nothing published for this version

  34. 0.8.1 09 May 2017

    Nothing published for this version

  35. 0.8.0 09 May 2017

    Nothing published for this version

  36. 0.7.6 07 May 2017

    Nothing published for this version

  37. 0.7.5 19 Apr 2017

    Nothing published for this version

  38. 0.7.4 11 Apr 2017

    Nothing published for this version

  39. 0.7.3 20 Mar 2017

    Nothing published for this version

  40. 0.7.2 08 Mar 2017

    Nothing published for this version

  41. 0.7.0 02 Mar 2017

    Nothing published for this version

  42. 0.6.2 07 May 2017

    Nothing published for this version

  43. 0.6.1 28 Feb 2017

    Nothing published for this version

  44. 0.6.0 26 Jan 2017

    Nothing published for this version

  45. 0.5.1 29 Dec 2016

    Nothing published for this version

  46. 0.5.0 29 Dec 2016

    Nothing published for this version

  47. 0.4.0 21 Nov 2016

    Nothing published for this version

  48. 0.3.1 13 Oct 2016

    Nothing published for this version

  49. 0.3.0 01 Aug 2016

    Nothing published for this version

  50. 0.2.5 09 Jun 2016

    Nothing published for this version

  51. 0.2.4 25 Apr 2016

    Nothing published for this version

  52. 0.2.3 21 Apr 2016

    Nothing published for this version

  53. 0.2.2 26 Nov 2015

    Nothing published for this version

  54. 0.2.1 18 Nov 2015

    Nothing published for this version

  55. 0.2.0 11 Aug 2015

    Nothing published for this version

  56. 0.1.21 01 Jun 2015

    Nothing published for this version

  57. 0.1.20 28 Apr 2015

    Nothing published for this version

  58. 0.1.19 22 Apr 2015

    Nothing published for this version

  59. 0.1.18 06 Apr 2015

    Nothing published for this version

  60. 0.1.17 02 Apr 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive