bug 687243 - websockets message len 0xffff does not use minimal length encoding r=jduell

This commit is contained in:
Patrick McManus 2011-09-27 08:50:22 -04:00
Родитель b5a2c9c036
Коммит e1f9acb723
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1263,7 +1263,7 @@ WebSocketChannel::PrimeNewOutgoingMessage()
if (mCurrentOut->Length() < 126) {
mOutHeader[1] = mCurrentOut->Length() | kMaskBit;
mHdrOutToSend = 6;
} else if (mCurrentOut->Length() < 0xffff) {
} else if (mCurrentOut->Length() <= 0xffff) {
mOutHeader[1] = 126 | kMaskBit;
((PRUint16 *)mOutHeader)[1] =
PR_htons(mCurrentOut->Length());