Skip to content

net/http: cookie name can't contain "[" and "]" #20429

Closed
@mlaraluna

Description

@mlaraluna

Golang 1.8, Ubuntu 16.04 64 Bit, Golang cannot using [ and ] for cookie name. for example
ck1 := http.Cookie{
Name: "[id]",
Value: "12345",
HttpOnly: true,
}
http.SetCookie(w, &ck1)

it will not be set,

it happen in httpserver and http client, for example this website ricardoalcala.com will set cookies that contain [ and ] in cookies name, if i make http request using cookiejar that cookie will not be save.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions