News for hackers. Stuff that matters.
Re:Websocket gets an update - the details. by sjs on Saturday June 05, 2010 @12:20AM (#1406332)
I completely understand your frustration with the over-specification. Why would they send it over the wire if it was never meant to be used though? Surely the other side is interpreting these bytes somehow and excepts them in a certain order.

[ a bit later ... ]

I decided to check the spec and see for myself what's going on. The part you're talking about, key3, is in fact used later. The bytes may be random but both sides need to know which of the 8 bytes comes first and which comes last.

    Let /challenge/ be the concatenation of /number_1/, expressed as
    a big-endian 32 bit integer, /number_2/, expressed as a big-
    endian 32 bit integer, and the eight bytes of /key_3/ in the
    order they were sent on the wire.
If the other side doesn't agree on the order of the bytes in key3 then things are not going to work. Your other complaints may be valid but sometimes this sort of over-specification helps implementers.

There are no comments on this comment yet.