Thank you for your reply. I didn't want to suggest a full-featured HTTP server, it's clearly too much.
What's in my mind is more an event which gets fired before the internal websocket handshake occurs and which passes the complete request and allows to provide a response, together with a flag "IsHandled". If the flag is set, the internal websocket handshake can be skipped and the response can be directly sent. If the flag is unset, the internal handshake can continue just as it is currently happening.