Closed GoogleCodeExporter closed 9 years ago
Sorry,
typo in the necessary CHANGE above.
CHANGE (WebSocket.m)
======================
- (void) close
{
[self close:WebSocketCloseStatusNormal message:nil];
}
- (void) close:(NSUInteger) aStatusCode message:(NSString*) aMessage
{
readystate = WebSocketReadyStateClosing;
//any rev before 10 does not perform a UTF8 check
if (self.config.version < WebSocketVersion10)
{
[self sendClose:aStatusCode message:aMessage];
}
else
{
if (aMessage && [aMessage canBeConvertedToEncoding:NSUTF8StringEncoding])
{
[self sendClose:aStatusCode message:aMessage];
}
else
{
[self sendClose:aStatusCode message:nil];
}
}
isClosing = YES;
}
Original comment by andre.moencher@gmail.com
on 12 Oct 2011 at 8:35
For version 10, both the client and server are supposed to throw an appropriate
error when invalid utf8 text is sent in a message. However, I think I need to
update that method anyways. I believe it is supposed to application data, not
just text. I'll take a second look on Monday and tighten this up.
Original comment by joshuadmorris@gmail.com
on 16 Oct 2011 at 8:35
It is supposed to be UTF8 text in the message body (if any application data is
included). The specification says to fail with the UTF failure code if we
receive text that is not UTF8. However, I like your take on it. The client
adapter received it from the caller, not the server. I will put in the
requested change. Good Idea!
Original comment by joshuadmorris@gmail.com
on 18 Oct 2011 at 5:05
Original comment by joshuadmorris@gmail.com
on 1 Dec 2011 at 10:54
Original comment by joshuadmorris@gmail.com
on 31 Jan 2012 at 6:32
Original issue reported on code.google.com by
andre.moencher@gmail.com
on 12 Oct 2011 at 8:25