[Modify] Polish it

This commit is contained in:
sta 2018-12-16 21:30:23 +09:00
parent 5b08d5358e
commit 25dace2fc9

View File

@ -559,11 +559,14 @@ namespace WebSocketSharp.Net
}
}
output.WriteByte ((byte) '%');
var i = (int) b;
output.WriteByte ((byte) _hexChars[i >> 4]);
output.WriteByte ((byte) _hexChars[i & 0x0F]);
var buff = new byte[3];
buff[0] = (byte) '%';
buff[1] = (byte) _hexChars[i >> 4];
buff[2] = (byte) _hexChars[i & 0x0F];
output.Write (buff, 0, 3);
}
private static byte[] urlEncodeToBytes (byte[] bytes, int offset, int count)