mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
update node modules
This commit is contained in:
14
node_modules/ws/lib/websocket-server.js
generated
vendored
14
node_modules/ws/lib/websocket-server.js
generated
vendored
@@ -286,7 +286,7 @@ class WebSocketServer extends EventEmitter {
|
||||
let protocol = req.headers['sec-websocket-protocol'];
|
||||
|
||||
if (protocol) {
|
||||
protocol = protocol.trim().split(/ *, */);
|
||||
protocol = protocol.split(',').map(trim);
|
||||
|
||||
//
|
||||
// Optionally call external protocol selection handler.
|
||||
@@ -404,3 +404,15 @@ function abortHandshake(socket, code, message, headers) {
|
||||
socket.removeListener('error', socketOnError);
|
||||
socket.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove whitespace characters from both ends of a string.
|
||||
*
|
||||
* @param {String} str The string
|
||||
* @return {String} A new string representing `str` stripped of whitespace
|
||||
* characters from both its beginning and end
|
||||
* @private
|
||||
*/
|
||||
function trim(str) {
|
||||
return str.trim();
|
||||
}
|
||||
|
Reference in New Issue
Block a user