Skip to content

net/http: support cookie names with colon #12698

Closed
@kayrus

Description

@kayrus

related to #7243

I've reviewed RFC 6265 but didn't find any statement that cookie value name should not contain comma.

I'm new to go and it was really hard to debug HTTPS (#12697) connection of site which uses commas in cookies' names. Quick fix looks like:

diff --git a/src/net/http/lex.go b/src/net/http/lex.go
index 50b14f8..1e6f3fa 100644
--- a/src/net/http/lex.go
+++ b/src/net/http/lex.go
@@ -32,6 +32,7 @@ var isTokenTable = [127]bool{
        '7':  true,
        '8':  true,
        '9':  true,
+       ':':  true,
        'A':  true,
        'B':  true,
        'C':  true,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions