h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Mount websocket on same path as another handler

Open tobiasdiez opened this issue 11 months ago • 0 comments

Environment

Nightly version of h3

Reproduction

Is there a template to start a reproduction?

Describe the bug

If you have a websocket handler and a normal handler on the same route, say

app.use('/', [
  defineWebSocketHandler({...}),
  defineEventHandler({...}),
])

or, the other way around,

app.use('/', [
  defineEventHandler({...}),
  defineWebSocketHandler({...}),
])

Then only the websocket or the normal request is working (depending on which comes first).

Additional context

No response

Logs

No response

tobiasdiez avatar Mar 23 '24 10:03 tobiasdiez