Closed
Description
It would be nice to implement a WStype_BAD_REQUEST for non-websocket connections and allow user to send a different response rather than the hard-coded one ( HTTP/1.1 400 Bad Request ) . This also can be used to handle simple non-websocket requests.
_cbEvent(client->num, WStype_BAD_REQUEST, (uint8_t *) client->cUrl.c_str(), client->cUrl.length());
If after calling the event connection is still open , or some variable is set , then fall -back to same hard-coded message as it is now at the end of WebSocketsServer.cpp file. I could fork this , but I think it would be a nice feature to the base code :)
Metadata
Metadata
Assignees
Labels
No labels