Forgot to add,
Double-quotes are being dropped with log message.
as per RFC6265 <https://tools.ietf.org/html/rfc6265#section-4.1.1> a
cookie-value can be enclosed in double-quotes.
Multiple issues were mentioned in github regarding this behavior but either
closed or stalled,
Why isn't this issue fixed still?
Thank you.
On Friday, February 5, 2021 at 7:33:38 PM UTC+5:30 nilsocket wrote:
> func main() {
> c := &http.Cookie{
> Name: "cookie",
> Value: "\"hello\"",
> }
> fmt.Println(c)
> }
>
> 1. Why too much work being done while printing
> <https://github.com/golang/go/blob/8869086d8f0a31033ccdc103106c768dc17216b1/src/net/http/cookie.go#L171>,
>
> shouldn't this be done only once?
> 2. Why not provide http.NewCookie() to check for validation and print
> normally?
>
> Thank you.
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/dbf13436-f382-4ff0-b4a6-b6151252db28n%40googlegroups.com.