Subject: [hybi] Question on Closing Frames

From: Micheil Smith <[email-masked]>
Date: Sat, 9 Apr 2011 19:54:57 +1000

Hi all, 

I'm currently working on an implementation of draft-06, and the draft does not indicate as to 
whether or not the message/status code component of a closing frame should be encoded 
as utf8.

The draft also does not define where in the frame this message/status code should be 
presented, eg, should it be in the application_data area? 

I'd assume the answers are "yes, utf8", and "yes, in application_data", however, I want to make 
sure before doing so.

 This should probably be clarified in the drafts.

Regards,
Micheil Smith
--
BrandedCode.com

---

From: Brian <[email-masked]>
Date: Sat, 9 Apr 2011 03:42:14 -0700

In section 4.5.1 the draft does actually specify that the close reason
should be encoded as a big-endian short, optionally followed by a
utf-8 text description:

The Close message MAY contain a body (the "application data" portion
   of the frame) that indicates a reason for closing, such as an
   endpoint shutting down, an endpoint having received a message too
   large, or an endpoint having received a message that does not conform
   to the format expected by the other endpoint.  If there is a body,
   the first two bytes of the body MUST be a 2-byte integer (in network
   byte order) representing a status code defined in Section 7.4.
   Following the 2-byte integer the body MAY contain UTF-8 encoded data,
   the interpretation of which is not defined by this specification.

Cheers,
Brian

On Sat, Apr 9, 2011 at 2:54 AM, Micheil Smith <[email-masked]> wrote:
> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi
>