Re: [hybi] Masking of Control Frames that have a zero length payload.
"Arman Djusupov" <email@example.com> Wed, 22 June 2011 09:21 UTC
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BB15011E8098 for <firstname.lastname@example.org>; Wed, 22 Jun 2011 02:21:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599]
Received: from mail.ietf.org ([126.96.36.199]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hdM2jYbSdMoq for <email@example.com>; Wed, 22 Jun 2011 02:21:07 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [188.8.131.52]) by ietfa.amsl.com (Postfix) with ESMTP id 65BC611E807F for <firstname.lastname@example.org>; Wed, 22 Jun 2011 02:21:05 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id FPR34503; Wed, 22 Jun 2011 12:21:03 +0300
From: "Arman Djusupov" <email@example.com>
To: "'John Tamplin'" <firstname.lastname@example.org>, "'Len Holgate'" <email@example.com>
References: <018501cc30b5$1939e460$0a00a8c0@Venus> <BANLkTi=p5=rVTS9coxyu5NjMPucXqFC23Q@mail.gmail.com>
Date: Wed, 22 Jun 2011 12:19:58 +0300
Content-Type: text/plain; charset="utf-8"
X-Mailer: Microsoft Outlook 14.0
Subject: Re: [hybi] Masking of Control Frames that have a zero length payload.
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:firstname.lastname@example.org?subject=unsubscribe>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:email@example.com?subject=subscribe>
X-List-Received-Date: Wed, 22 Jun 2011 09:21:07 -0000
> IMHO, the utility of a zero-length frame seems low enough that it doesn't warrant adding a special case to leave off the mask if the payload length is zero. In practice 0 length frames do appear quite often as terminal frames of messages when data is streamed from a source of unknown length. I see this happening when my implementation sends the output of an object serializer that flushes the stream and then suddenly closes it. If the message stream is closed when it doesn’t have any data buffered, there is no other option but to send the 0 length terminal frame for this message. Control frames are of course another case when the frame might contain no data. However, I think that adding the mask to ALL frames uniformly is not a bad idea. It’s not a huge waste of bandwidth and does not cause any significant overhead, at the same time the random mask attached to the frame header increases the unpredictability of the payload which eliminates the remote chance that an attacker could produce some attack sequence by playing with opcodes and reserved flags when the API would permit using them (highly unlikely though). In any case, I do like the simplicity – “ALL frames are masked and end of story”, the fewer IF ELSE in the spec the better. With best regards, Arman
- [hybi] Masking of Control Frames that have a zero… Len Holgate
- Re: [hybi] Masking of Control Frames that have a … John Tamplin
- Re: [hybi] Masking of Control Frames that have a … Arman Djusupov