Skip to content

internal whitespace in cookie names and values #2262

Open
@bagder

Description

@bagder

When it comes to the client side parsing of cookies, both RFC 6265 as well as 6265bis-10 state:

the algorithm strips leading and trailing whitespace from the cookie name and value (but maintains internal whitespace),

  1. We already previously discussed how browsers accept TABs in Set-Cookie: lines in general.
  2. Firefox and Chrome both reject cookies with an "internal TAB", like if the name is self\tdestruct (I use \t here as a symbol for ASCII 9).
  3. Firefox strips off TABs from the content so that name=one\ttwo becomes name=onetwo
  4. Chrome seems to completely reject cookies with TABs in the content

Okay, this is but observations done on two widely used implementations but still.

How should a client implementation treat TABs in names and content?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions