Skip to content
Myr

Fix exception in req.fresh/req.stale without response headers

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #2468

authored by Troy Goode · committed by Douglas Christopher Wilson · parent 262b605 · Browse files · 4 files+32 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+32 added−1 removed

  • tests:+26 added−0 removed
  • other:+6 added−1 removed

4 files+32 added−1 removed

modified:lib/request.js+1 added-1 removed
524 unmodified lines
525 if ('GET' != method && 'HEAD' != method) return false;526527 // 2xx or 304 as per rfc2616 14.26528 if ((s >= 200 && s < 300) || 304 == s) {529 return fresh(this.headers, this.res._headers);529 return fresh(this.headers, (this.res._headers || {}));530 }531532 return false;533});
25 unmodified lines
modified:test/req.fresh.js+13 added
modified:test/req.stale.js+13 added
modified:History.md+5 added
13.x2===34 * Fix exception in `req.fresh`/`req.stale` without response headers563.18.5 / 2014-12-117===================89 * deps: connect@2.27.6
1901 unmodified lines