Lines Matching refs:req
106 req,
124 this._assertRequestHasHeaders(req);
138 this._method = 'method' in req ? req.method : 'GET';
139 this._url = req.url;
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['cache-control']);
220 _assertRequestHasHeaders(req) {
221 if (!req || !req.headers) {
226 satisfiesWithoutRevalidation(req) {
227 this._assertRequestHasHeaders(req);
232 const requestCC = parseCacheControl(req.headers['cache-control']);
233 if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {
261 return this._requestMatches(req, false);
264 _requestMatches(req, allowHeadMethod) {
267 (!this._url || this._url === req.url) &&
268 this._host === req.headers.host &&
270 (!req.method ||
271 this._method === req.method ||
272 (allowHeadMethod && 'HEAD' === req.method)) &&
274 this._varyMatches(req)
287 _varyMatches(req) {
302 if (req.headers[name] !== this._reqHeaders[name]) return false;