Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/Utf8.h"
|
||||
#include "mozilla/net/WebSocketEventService.h"
|
||||
|
||||
#include "nsIURI.h"
|
||||
@@ -1654,7 +1655,7 @@ nsresult WebSocketChannel::ProcessInput(uint8_t* buffer, uint32_t count) {
|
||||
}
|
||||
|
||||
// Section 8.1 says to fail connection if invalid utf-8 in text message
|
||||
if (!IsUTF8(utf8Data)) {
|
||||
if (!IsUtf8(utf8Data)) {
|
||||
LOG(("WebSocketChannel:: text frame invalid utf-8\n"));
|
||||
return NS_ERROR_CANNOT_CONVERT_DATA;
|
||||
}
|
||||
@@ -1703,7 +1704,7 @@ nsresult WebSocketChannel::ProcessInput(uint8_t* buffer, uint32_t count) {
|
||||
// (which are non-conformant to send) with u+fffd,
|
||||
// but secteam feels that silently rewriting messages is
|
||||
// inappropriate - so we will fail the connection instead.
|
||||
if (!IsUTF8(mServerCloseReason)) {
|
||||
if (!IsUtf8(mServerCloseReason)) {
|
||||
LOG(("WebSocketChannel:: close frame invalid utf-8\n"));
|
||||
return NS_ERROR_CANNOT_CONVERT_DATA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user