golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.22k stars 17.57k forks source link

x/net/websocket: mis-handshake when a request has no origin header #10102

Closed mikioh closed 9 years ago

mikioh commented 9 years ago

It returns a &url.Error{Op:"parse", URL:"", Err:"empty url"} error, but RFC 6455 says that "This header field is sent by browser clients; for non-browser clients, this header field may be sent if it makes sense in the context of those clients." in the Opening Handshake section.

gopherbot commented 9 years ago

CL https://golang.org/cl/7034 mentions this issue.