jrconlin/pushgo

invalid key sent after first messageType continues to returns status:200

Closed this issue · 1 comments

run local server

  1. run this: python wsdump.py ws://localhost:8080/ws
  2. enter this{"messageType":"hello"} then hit return
  3. enter this{"foobar":"123"} then hit return

result:

{"messageType":"hello"}
< {"messageType":"hello","status":200,"uaid":"13878ad7407840158047ccf92e8a03dc"}
{"foo":"123"}
< {"messageType":"hello","status":200,"uaid":"13878ad7407840158047ccf92e8a03dc"}

expected: you should get status:401 unknown command after handshake. MessageType is always required and thus should return error.

from the docs: pushServer is supposed to ignore multiple 'hello' but i'm not sending hello.

https://wiki.mozilla.org/WebAPI/SimplePush/Protocol
PushServers MUST send only respond to a hello once. UserAgents MUST ignore multiple hello replies.