| /third_party/node/deps/npm/node_modules/http-cache-semantics/ |
| H A D | index.js | 121 if (!res || !res.headers) { 122 throw Error('Response headers missing'); 136 this._resHeaders = res.headers; 137 this._rescc = parseCacheControl(res.headers['cache-control']); 140 this._host = req.headers.host; 141 this._noAuthorization = !req.headers.authorization; 142 this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used 143 this._reqcc = parseCacheControl(req.headers['cach [all...] |
| /third_party/node/test/parallel/ |
| H A D | test-http2-util-headers-list.js | 4 // Tests the internal utility functions that are used to prepare headers 99 const headers = { 109 mapToHeaders(headers), 117 const headers = { 126 mapToHeaders(headers), 133 const headers = { 143 mapToHeaders(headers), 152 const headers = Object.create(base); 153 headers[':status'] = 200; 154 headers [all...] |
| H A D | test-http-max-http-headers.js | 14 // Verify that we cannot receive more than 16KB of headers. 32 function fillHeaders(headers, currentSize, valid = false) { 36 headers += 'a'.repeat(MAX - currentSize); 38 // Generate valid headers 40 headers = headers.slice(0, -1); 42 return headers + '\r\n\r\n'; 45 function writeHeaders(socket, headers) { 50 for (let i = 0; i < headers.length / chunkSize; i++) { 52 array.push(headers [all...] |
| H A D | test-http2-multiheaders.js | 31 function checkHeaders(headers) { 32 assert.strictEqual(headers.accept, 'abc, def, ghijklmnop'); 33 assert.strictEqual(headers['www-authenticate'], 'foo, bar, baz'); 34 assert.strictEqual(headers['proxy-authenticate'], 'foo, bar, baz'); 35 assert.strictEqual(headers['x-foo'], 'foo, bar, baz'); 36 assert.strictEqual(headers.constructor, 'foo, bar, baz'); 38 assert.strictEqual(headers.__proto__, 'foo, bar, baz'); 41 server.on('stream', common.mustCall((stream, headers) => { 42 assert.strictEqual(headers[':path'], '/'); 43 assert.strictEqual(headers[' [all...] |
| H A D | test-http-proxy.js | 33 const headers = { 'content-type': 'text/plain', 39 res.writeHead(200, headers); 45 console.error(`proxy req headers: ${JSON.stringify(req.headers)}`); 51 console.error(`proxy res headers: ${JSON.stringify(proxy_res.headers)}`); 53 assert.strictEqual(proxy_res.headers.hello, 'world'); 54 assert.strictEqual(proxy_res.headers['content-type'], 'text/plain'); 55 assert.deepStrictEqual(proxy_res.headers['set-cookie'], cookies); 57 res.writeHead(proxy_res.statusCode, proxy_res.headers); [all...] |
| H A D | test-http-parser.js | 44 parser.headers = []; 47 parser[kOnHeaders] = function(headers, url) { 48 parser.headers = parser.headers.concat(headers); 78 const onHeadersComplete = (versionMajor, versionMinor, headers, 120 const onHeadersComplete = (versionMajor, versionMinor, headers, 142 // Response with no headers. 148 const onHeadersComplete = (versionMajor, versionMinor, headers, 155 assert.deepStrictEqual(headers || parse [all...] |
| H A D | test-http-client-headers-array.js | 16 // no Host header when you set headers an array 17 if (!Array.isArray(options.headers)) { 21 // no Authorization header when you set headers an array 22 if (options.auth && !Array.isArray(options.headers)) { 29 assert.deepStrictEqual(req.headers, expectHeaders); 43 execute({ headers: { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } }); 44 execute({ headers: { 'x-foo': 'boom', 'cookie': [ 'a=1', 'b=2', 'c=3' ] } }); 45 execute({ headers: [[ 'x-foo', 'boom' ], [ 'cookie', 'a=1; b=2; c=3' ]] }); 46 execute({ headers: [ 49 execute({ headers [all...] |
| H A D | test-http2-cookies.js | 20 function onStream(stream, headers, flags) { 22 assert.strictEqual(typeof headers.abc, 'string'); 23 assert.strictEqual(headers.abc, '1, 2, 3'); 24 assert.strictEqual(typeof headers.cookie, 'string'); 25 assert.strictEqual(headers.cookie, 'a=b; c=d; e=f'); 49 req.on('response', common.mustCall((headers) => { 50 assert(Array.isArray(headers['set-cookie'])); 51 assert.deepStrictEqual(headers['set-cookie'], setCookie);
|
| /third_party/node/deps/undici/src/lib/mock/ |
| H A D | mock-utils.js | 32 function lowerCaseEntries (headers) { 34 Object.entries(headers).map(([headerName, headerValue]) => { 41 * @param {import('../../index').Headers|string[]|Record<string, string>} headers 44 function getHeaderByName (headers, key) { 45 if (Array.isArray(headers)) { 46 for (let i = 0; i < headers.length; i += 2) { 47 if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { 48 return headers[i + 1] 53 } else if (typeof headers.get === 'function') { 54 return headers [all...] |
| /third_party/node/deps/undici/src/lib/core/ |
| H A D | request.js | 42 channels.headers = diagnosticsChannel.channel('undici:request:headers') 48 channels.headers = { hasSubscribers: false } 58 headers, 176 this.headers = '' 181 if (Array.isArray(headers)) { 182 if (headers.length % 2 !== 0) { 183 throw new InvalidArgumentError('headers array must be even') 185 for (let i = 0; i < headers.length; i += 2) { 186 processHeader(this, headers[ [all...] |
| /third_party/node/deps/undici/src/lib/handler/ |
| H A D | RedirectHandler.js | 81 onUpgrade (statusCode, headers, socket) { 82 this.handler.onUpgrade(statusCode, headers, socket) 89 onHeaders (statusCode, headers, resume, statusText) { 92 : parseLocation(statusCode, headers) 99 return this.handler.onHeaders(statusCode, headers, resume, statusText) 105 // Remove headers referring to the original URL. 106 // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. 108 this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) 173 function parseLocation (statusCode, headers) { [all...] |
| /third_party/node/lib/ |
| H A D | _http_outgoing.js | 224 const headers = this[kOutHeaders] = ObjectCreate(null); 230 headers[StringPrototypeToLowerCase(name)] = [name, val[name]]; 249 const headers = this[kOutHeaders]; 250 if (headers !== null) { 252 const keys = ObjectKeys(headers); 257 const val = headers[key][0]; 266 const headers = this[kOutHeaders]; 267 if (!headers) 273 const header = headers[keys[i]]; 288 const headers [all...] |
| H A D | _http_common.js | 55 // that the request headers were either fragmented 58 // called to process trailing HTTP headers. 59 function parserOnHeaders(headers, url) { 60 // Once we exceeded headers limit - stop collecting them 63 this._headers.push(...headers); 68 // `headers` and `url` are set only if .onHeaders() has not been called for 72 function parserOnHeadersComplete(versionMajor, versionMinor, headers, method, 78 if (headers === undefined) { 79 headers = parser._headers; 102 let n = headers [all...] |
| /third_party/typescript/tests/baselines/reference/ |
| H A D | parameterDestructuringObjectLiteral.js | 4 const fn1 = (options: { headers?: {} }) => { }; 5 fn1({ headers: { foo: 1 } }); 7 const fn2 = ({ headers = {} }) => { }; 8 fn2({ headers: { foo: 1 } }); 14 fn1({ headers: { foo: 1 } });
16 var _b = _a.headers, headers = _b === void 0 ? {} : _b;
18 fn2({ headers: { foo: 1 } });
23 headers?: {};
25 declare const fn2: ({ headers } [all...] |
| /third_party/node/deps/npm/node_modules/make-fetch-happen/lib/cache/ |
| H A D | entry.js | 14 // allow list for request headers that will be written to the cache index 15 // note: we will also store any request headers 25 // allow list for response headers that will be written to the cache index 64 if (request.headers.has(name)) { 65 metadata.reqHeaders[name] = request.headers.get(name) 71 const host = request.headers.get('host') 78 // we store the relevant request headers too 79 if (response.headers.has('vary')) { 80 const vary = response.headers.get('vary') 82 // in that scenario, we do not include any additional headers [all...] |
| /third_party/python/Lib/distutils/command/ |
| H A D | config.py | 107 def _gen_temp_sourcefile(self, body, headers, lang): 110 if headers: 111 for header in headers: 119 def _preprocess(self, body, headers, include_dirs, lang): 120 src = self._gen_temp_sourcefile(body, headers, lang) 126 def _compile(self, body, headers, include_dirs, lang): 127 src = self._gen_temp_sourcefile(body, headers, lang) 135 def _link(self, body, headers, include_dirs, libraries, library_dirs, 137 (src, obj) = self._compile(body, headers, include_dirs, lang) 172 def try_cpp(self, body=None, headers [all...] |
| /third_party/node/deps/undici/src/lib/ |
| H A D | proxy-agent.js | 13 const kProxyHeaders = Symbol('proxy headers') 66 this[kProxyHeaders] = opts.headers || {} 98 headers: { 127 const headers = buildHeaders(opts.headers) 128 throwIfProxyAuthIsSent(headers) 132 headers: { 133 ...headers, 153 * @param {string[] | Record<string, string>} headers 156 function buildHeaders (headers) { [all...] |
| /third_party/python/Lib/urllib/ |
| H A D | request.py | 39 headers, e.g. a User-Agent. 168 context manager and has the properties url, headers, and status. 175 headers as it is specified in the documentation for HTTPResponse. 242 headers = fp.info() 244 # Just return the local path and the "headers" for file:// 247 return os.path.normpath(path), headers 258 result = filename, headers 263 if "content-length" in headers: 264 size = int(headers["Content-Length"]) 319 def __init__(self, url, data=None, headers [all...] |
| /third_party/nghttp2/src/ |
| H A D | http3.cc | 83 const HeaderRefs &headers, uint8_t nv_flags, in copy_headers_to_nva_internal() 85 auto it_forwarded = std::end(headers); in copy_headers_to_nva_internal() 86 auto it_xff = std::end(headers); in copy_headers_to_nva_internal() 87 auto it_xfp = std::end(headers); in copy_headers_to_nva_internal() 88 auto it_via = std::end(headers); in copy_headers_to_nva_internal() 90 for (auto it = std::begin(headers); it != std::end(headers); ++it) { in copy_headers_to_nva_internal() 127 if (it_forwarded == std::end(headers)) { in copy_headers_to_nva_internal() 140 if (it_xff == std::end(headers)) { in copy_headers_to_nva_internal() 153 if (it_xfp == std::end(headers)) { in copy_headers_to_nva_internal() 82 copy_headers_to_nva_internal(std::vector<nghttp3_nv> &nva, const HeaderRefs &headers, uint8_t nv_flags, uint32_t flags) copy_headers_to_nva_internal() argument 181 copy_headers_to_nva(std::vector<nghttp3_nv> &nva, const HeaderRefs &headers, uint32_t flags) copy_headers_to_nva() argument 186 copy_headers_to_nva_nocopy(std::vector<nghttp3_nv> &nva, const HeaderRefs &headers, uint32_t flags) copy_headers_to_nva_nocopy() argument [all...] |
| /third_party/node/lib/internal/http2/ |
| H A D | compat.js | 75 const kHeaders = Symbol('headers'); 319 constructor(stream, headers, options, rawHeaders) { 328 this[kHeaders] = headers; 363 get headers() { 586 addTrailers(headers) { 587 const keys = ObjectKeys(headers); 591 this.setTrailer(key, headers[key]); 606 const headers = ObjectCreate(null); 607 return ObjectAssign(headers, this[kHeaders]); 672 writeHead(statusCode, statusMessage, headers) { [all...] |
| H A D | core.js | 235 const kInfoHeaders = Symbol('sent-info-headers'); 246 const kSentHeaders = Symbol('sent-headers'); 333 // Called when a new block of headers has been received for a given 336 // event. If the stream is not new, emit the 'headers' event to pass 337 // the block of headers on. 338 function onSessionHeaders(handle, id, cat, flags, headers, sensitiveHeaders) { 345 debugStream(id, type, 'headers received'); 352 const obj = toHeaderObject(headers, sensitiveHeaders); 386 process.nextTick(emit, session, 'stream', stream, obj, flags, headers); 395 event = 'headers'; [all...] |
| /third_party/node/deps/undici/src/lib/cookies/ |
| H A D | index.js | 6 const { Headers } = require('../fetch/headers') 23 * @param {Headers} headers 26 function getCookies (headers) { 29 webidl.brandCheck(headers, Headers, { strict: false }) 31 const cookie = headers.get('cookie') 48 * @param {Headers} headers 53 function deleteCookie (headers, name, attributes) { 56 webidl.brandCheck(headers, Headers, { strict: false }) 63 setCookie(headers, { 72 * @param {Headers} headers [all...] |
| /third_party/node/deps/npm/node_modules/minipass-fetch/lib/ |
| H A D | response.js | 5 const Headers = require('./headers.js') 16 const headers = new Headers(opts.headers) 18 if (body !== null && body !== undefined && !headers.has('Content-Type')) { 21 headers.append('Content-Type', contentType) 29 headers, 59 get headers () { 60 return this[INTERNALS].headers 68 headers: this.headers, [all...] |
| /third_party/curl/tests/libtest/ |
| H A D | lib540.c | 52 struct curl_slist *headers) in init() 84 res_easy_setopt(eh[num], CURLOPT_HTTPHEADER, headers); /* custom Host: */ in init() 103 struct curl_slist *headers) in loop() 112 res = init(num, cm, url, userpwd, headers); in loop() 198 struct curl_slist *headers = NULL; in test() local 214 headers = curl_slist_append(headers, buffer); in test() 215 if(!headers) { in test() 222 curl_slist_free_all(headers); in test() 229 curl_slist_free_all(headers); in test() 51 init(int num, CURLM *cm, const char *url, const char *userpwd, struct curl_slist *headers) init() argument 102 loop(int num, CURLM *cm, const char *url, const char *userpwd, struct curl_slist *headers) loop() argument [all...] |
| /third_party/ffmpeg/libavformat/ |
| H A D | rtpenc_rfc4175.c | 67 uint8_t *headers; in ff_rtp_send_raw_rfc4175() local 77 headers = dest; in ff_rtp_send_raw_rfc4175() 121 length = (headers[0] << 8) | headers[1]; in ff_rtp_send_raw_rfc4175() 122 l_field = (headers[2] & 0x80) >> 7; in ff_rtp_send_raw_rfc4175() 123 l_line = ((headers[2] & 0x7f) << 8) | headers[3]; in ff_rtp_send_raw_rfc4175() 124 l_off = ((headers[4] & 0x7f) << 8) | headers[5]; in ff_rtp_send_raw_rfc4175() 125 cont = headers[ in ff_rtp_send_raw_rfc4175() [all...] |