diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
| commit | 434aa8343fdcbb4d5002f934979913c099489bee (patch) | |
| tree | 55bab4ec5a6151be57797d34f61faf5ea744471b /frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js | |
| parent | 893c388d4e99442a36005e5971a87730623f946e (diff) | |
sdk, del
Diffstat (limited to 'frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js')
| -rw-r--r-- | frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js b/frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js deleted file mode 100644 index bc96b7d..0000000 --- a/frontend-old/node_modules/websocket-driver/lib/websocket/driver/headers.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Headers = function() { - this.clear(); -}; - -Headers.prototype.ALLOWED_DUPLICATES = ['set-cookie', 'set-cookie2', 'warning', 'www-authenticate']; - -Headers.prototype.clear = function() { - this._sent = {}; - this._lines = []; -}; - -Headers.prototype.set = function(name, value) { - if (value === undefined) return; - - name = this._strip(name); - value = this._strip(value); - - var key = name.toLowerCase(); - if (!this._sent.hasOwnProperty(key) || this.ALLOWED_DUPLICATES.indexOf(key) >= 0) { - this._sent[key] = true; - this._lines.push(name + ': ' + value + '\r\n'); - } -}; - -Headers.prototype.toString = function() { - return this._lines.join(''); -}; - -Headers.prototype._strip = function(string) { - return string.toString().replace(/^ */, '').replace(/ *$/, ''); -}; - -module.exports = Headers; |
