<commit_before># The headers are retrieved as a map with string keys and a list of strings
# Known headers are fetched with an atom key
# Can I Overwrite Access
# headers[:Cookie] -> Cookies
# headers["cookie"] -> string

# Response.set_cookie(response, "key", "value", opts)
# Response.set_cookie(response, cookie)

defmodule Raxx.CookieTest do
  @moduledoc ~S"""
  For a good introduction too cookies check [http cookies explained](https://www.nczonline.net/blog/2009/05/05/http-cookies-explained/)

  There are a lot of issues when it comes to formatting cookies.
  The Wiki article for cookies discusses 3 relevant [RFC's](https://en.wikipedia.org/wiki/HTTP_cookie#History).
  - RFC 2109 (Feb 1997) as the first specification for third-party cookies.
  - RFC 2965 (Oct 2000) as a replacement to RFC 2109.
  - RFC 6265 (Apr 2011) A definitive specification of real world usage.

  The majority of this modules behaviour is directed by RCF 6265.
  Where possible this extends to variable and method naming.

  Additional sources are:
  - [the plug source code](https://github.com/elixir-lang/plug/blob/0b387966d2f21cf050ca666f328864b546b4e754/lib/plug/conn/cookies.ex)
  - [the rack source code](https://github.com/rack/rack/blob/95172a60fe5c2a3850163fc75e0981fe440c064e/lib/rack/utils.rb)

  Expires vs Max-Age
  This two cookie attributes both exist for the same functionality.
  i.e. giving a livetime to persisted cookies(if neither id given then the cookie is a session cookie).

  There is more detail at [HTTP Cookies: What's the difference between Max-age and Expires?](http://mrcoles.com/blog/cookies-max-age-vs-expires/)
  In summary max-age is the newer way to set cookie deletion.

  Raxx does not convert from expires to max age or visa-versa.
  If you need both set then both will need to be set by the application.
  """

  alias Raxx.Cookie
  use ExUnit.Case<commit_msg>add datetime comments<commit_after># The headers are retrieved as a map with string keys and a list of strings
# Known headers are fetched with an atom key
# Can I Overwrite Access
# headers[:Cookie] -> Cookies
# headers["cookie"] -> string

# Response.set_cookie(response, "key", "value", opts)
# Response.set_cookie(response, cookie)

defmodule Raxx.CookieTest do
  @moduledoc ~S"""
  For a good introduction too cookies check [http cookies explained](https://www.nczonline.net/blog/2009/05/05/http-cookies-explained/)

  There are a lot of issues when it comes to formatting cookies.
  The Wiki article for cookies discusses 3 relevant [RFC's](https://en.wikipedia.org/wiki/HTTP_cookie#History).
  - RFC 2109 (Feb 1997) as the first specification for third-party cookies.
  - RFC 2965 (Oct 2000) as a replacement to RFC 2109.
  - RFC 6265 (Apr 2011) A definitive specification of real world usage.

  The majority of this modules behaviour is directed by RCF 6265.
  Where possible this extends to variable and method naming.

  Additional sources are:
  - [the plug source code](https://github.com/elixir-lang/plug/blob/0b387966d2f21cf050ca666f328864b546b4e754/lib/plug/conn/cookies.ex)
  - [the rack source code](https://github.com/rack/rack/blob/95172a60fe5c2a3850163fc75e0981fe440c064e/lib/rack/utils.rb)

  Expires vs Max-Age
  This two cookie attributes both exist for the same functionality.
  i.e. giving a livetime to persisted cookies(if neither id given then the cookie is a session cookie).

  There is more detail at [HTTP Cookies: What's the difference between Max-age and Expires?](http://mrcoles.com/blog/cookies-max-age-vs-expires/)
  In summary max-age is the newer way to set cookie deletion.

  Raxx does not convert from expires to max age or visa-versa.
  Preferably use max-age for a simpler interface.
  For old IE support use expires, new browsers still support this.
  If you need both set then both will need to be set by the application.

  The expires date format is the subject of conflicting RFC's the best is [RFC 2616](https://tools.ietf.org/html/rfc2616#section-3.3.1)
  """

  alias Raxx.Cookie
  use ExUnit.Case
{'fraction_non_alphanumeric': 0.08469539375928678, 'fraction_numerical': 0.0512630014858841, 'mean_word_length': 4.067754077791719, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 9, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7557250', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1198, 'n_words': 478}