Skip to content

HEAD requests not stripping body #23

@hunkydoryrepair

Description

@hunkydoryrepair

Normally, express will route HEAD requests to the get handler if there is not an explicit head handler.
This library seems to do that appropriately as well.

However, what express does that this does not do, is strip the BODY response. uWebSockets-express seems to be sending the body back on a HEAD request.

This is particularly bad when used with the @colyseus/proxy, since the presence of the BODY creates an error event on the proxy, and the proxy, as a result, unregisters the server, and then subsequently tries every other proxy server, killing them 1 by 1. So, a single call to curl takes down anything running @colyseus/proxy and uWebSockets w/ express simulation pretty much totally.

curl -I http://your-colyseus-proxy/express-endpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions