kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
Apache License 2.0
763 stars 273 forks source link

Handshake issue - the "Upgrade" header should use lowercase ("websocket") #64

Closed scolestock closed 7 years ago

scolestock commented 7 years ago

In drafthybi00processor.cs and DraftHybi10Processor.cs, the "Upgrade" header is added using the casing "WebSocket".

The RFC 6455 standard says: "The request MUST contain an |Upgrade| header field whose value MUST include the "websocket" keyword."

I am running into some scenarios where this casing difference is causing the handshake to not complete. If I change the case in the files above to "websocket", everything works fine.

kerryjiang commented 7 years ago

Great, I'll fix it ASAP! Thanks for your finding!

kerryjiang commented 7 years ago

See this commit of many days ago: https://github.com/kerryjiang/WebSocket4Net/commit/70df1bf57f79f0d4944b8fc0003f454c498fd380

scolestock commented 7 years ago

Thanks!