Skip to content

Don't Accept Websocket Upgrade on non-Websocket Routes #51

Description

@fhessel

Describe the bug
The server accept websocket upgrades on non-websocket routes.

How To Reproduce
Steps to reproduce the behavior (example):

  1. Flash the chat example to the device.
  2. Open the chat page in a browser tab.
  3. Keep the tab open and flash another example without websockets to the device.
  4. Click on the "Connect" button to send a websocket request.

Expected Behavior
The server should reject the websocket upgrade request.

Actual Behavior
The server goes into upgrade mode:

[HTTPS:I] New connection. Socket FID=55
[HTTPS:I] Request: GET /chat (FID=55)
[HTTPS:I] Upgrading to WS, FID=55

This is followed by a Guru Meditation / Panic:

Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited). Exception was unhandled.

ESP32 Module
ESP32 WROVER 16/16

Software (please complete the following information if applicable)

  • IDE and Version: PlatformIO - Home 2.3.3, Core 4.0.3
  • OS: Debian Buster
  • Client used to access the server: Firefox 60.9.0esr (64-bit)

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions