Skip to content

Crash: request is not acceptable in server #11

@LuisMayo

Description

@LuisMayo

Hi and thanks for this library, it really ease things up.

I have detected that when you use WebSocketServer and go and try to establish an HTTP connection to the websocket port the server crashes and closes.

While I obviously don't expect the WS server to work properly when being contacted by the wrong protocol it should fail silently, or at least, allow the programmer to specify an error callback in case things like this occur.

I know that the error is indeed generated by Deno's std library ws. However I think if possible it should be handled here.

Steps to reproduce

  1. deno run --allow-net https://deno.land/x/[email protected]/example/server.ts
  2. Open http://localhost:8080/
  3. Now the server has crashed

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions