8000 implement WStype_BAD_REQUEST in WebSocketServer · Issue #10 · Links2004/arduinoWebSockets · GitHub
[go: up one dir, main page]

Skip to content
implement WStype_BAD_REQUEST in WebSocketServer #10
Closed
@starlino

Description

@starlino

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0