ring-clojure / ring

Clojure HTTP server abstraction
MIT License
3.76k stars 520 forks source link

fix: websocket multi-value connection upgrades #489

Closed rschmukler closed 10 months ago

rschmukler commented 10 months ago

Fixes an issue where browsers could send keep-alive and Upgrade in the same request causing the ws/upgrade-request? to return false.

weavejester commented 10 months ago

Thank you for the fix! Could you change the commit description to:

Fix websocket multi-value connection upgrades

Fix an issue where browsers could send Keep-Alive and Upgrade in the
same request causing upgrade-request? to return false.

This just makes it more consistent with the other commits in Ring.

rschmukler commented 10 months ago

@weavejester Done! Also changed the impl to handle nil values. Sorry for the noise. Didn't run the tests locally before submitting the PR. Works now!

rschmukler commented 10 months ago

No problem at all! Yours looks good! I can submit an amended commit tomorrow (about 12 hours) or you're welcome to commit whatever you feel is best.

Cheers!

rschmukler commented 10 months ago

@weavejester I've submitted a new commit with the suggested implementation. Thanks again!