sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.72k stars 1.66k forks source link

Allow both BASIC and DIGEST at once #209

Open borrrden opened 8 years ago

borrrden commented 8 years ago

Right now the library forces us to choose one or the other (https://github.com/sta/websocket-sharp/blob/master/websocket-sharp/Net/HttpListener.cs#L512-L515). However, what if we want the option for either? Could you modify this so that it will accept an HTTP Basic header if present, but return a digest challenge if not? Or is that too case specific?

borrrden commented 8 years ago

P.S. I've been able to implement this, so if you are interested I'll send a PR for this.