Index: Source/modules/websockets/WebSocketHandshake.cpp |
diff --git a/Source/modules/websockets/WebSocketHandshake.cpp b/Source/modules/websockets/WebSocketHandshake.cpp |
index b0ed328eb15260c46a096eeea958649db3264814..e5e728fcfeb9b3abed681026a3b762206b22c466 100644 |
--- a/Source/modules/websockets/WebSocketHandshake.cpp |
+++ b/Source/modules/websockets/WebSocketHandshake.cpp |
@@ -104,10 +104,9 @@ static String hostName(const KURL& url, bool secure) |
static const size_t maxInputSampleSize = 128; |
static String trimInputSample(const char* p, size_t len) |
{ |
- String s = String(p, std::min<size_t>(len, maxInputSampleSize)); |
if (len > maxInputSampleSize) |
- s.append(horizontalEllipsis); |
- return s; |
+ return String(p, maxInputSampleSize) + horizontalEllipsis; |
+ return String(p, len); |
} |
static String generateSecWebSocketKey() |