Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/rentals.picotech.app/public_html/node_modules/jsdom/lib/jsdom/living/fetch/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
/**
* Provides some utility functions for somewhat efficiently modifying a
* collection of headers.
*
* Note that this class only operates on ByteStrings (which is also why we use
* toLowerCase internally).
*/
class HeaderList {
constructor() {
this.headers = new Map();
}
append(name, value) {
const existing = this.headers.get(name.toLowerCase());
if (existing) {
existing.push(value);
} else {
this.headers.set(name.toLowerCase(), [value]);
}
}
contains(name) {
return this.headers.has(name.toLowerCase());
}
get(name) {
name = name.toLowerCase();
const values = this.headers.get(name);
if (!values) {
return null;
}
return values;
}
delete(name) {
this.headers.delete(name.toLowerCase());
}
set(name, value) {
const lowerName = name.toLowerCase();
this.headers.delete(lowerName);
this.headers.set(lowerName, [value]);
}
sortAndCombine() {
const names = [...this.headers.keys()].sort();
const headers = [];
for (const name of names) {
if (name === "set-cookie") {
for (const value of this.get(name)) {
headers.push([name, value]);
}
} else {
headers.push([name, this.get(name).join(", ")]);
}
}
return headers;
}
}
module.exports = HeaderList;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]-- |