celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
595 stars 87 forks source link

Copy ping payload data when creating a pong response #59

Closed afcapel closed 11 years ago

afcapel commented 11 years ago

According to the RFC6455 spec section 5.5.3:

A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to.

I've updated websocket_parser to allow ping and pong messages with arbitrary payloads and to provide the payload as a parameter to the on_ping and on_pong callbacks.

This PR updates Reel to use this feature in the latest version of websocket_parser.

coveralls commented 11 years ago

Coverage Status

Coverage increased (+0%) when pulling e4162081c9a6643613dea29230ddb3325369b230 on afcapel:master into 161c00a601bb4d2d3e71f0e57f78075fce29e6b3 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage increased (+0%) when pulling e4162081c9a6643613dea29230ddb3325369b230 on afcapel:master into 161c00a601bb4d2d3e71f0e57f78075fce29e6b3 on celluloid:master.

halorgium commented 11 years ago

LGTM.