useid / handlersjs

MIT License
3 stars 3 forks source link

fix: don't crash server when a non HTTP method was provided #236

Closed BelgianNoise closed 1 year ago

BelgianNoise commented 1 year ago

Changes in this PR

BelgianNoise commented 1 year ago

I just realised: what happens with an empty string method? Is it possible, if so, how does this handle it?

This would still crash the server. But afaik this is literally impossible cause we are using node http's built in request streams for this. An empty method is not possible. (link to node http IncomingMessage doc) Is there a way to forge a request with an empty method ourselves ?