Skip to content
Myr

Include ETag in HEAD requests

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

fixes #2083

authored by Tiago Relvao · committed by Douglas Christopher Wilson · parent 61f2929 · Browse files · 2 files+24 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

2 files+24 added−1 removed

  • tests:+23 added−0 removed
  • other:+1 added−1 removed

2 files+24 added−1 removed

modified:lib/response.js+1 added-1 removed
128 unmodified lines
129 }130131 // ETag support132 // TODO: W/ support133 if (app.settings.etag && len && 'GET' == req.method) {133 if (app.settings.etag && len && ('GET' == req.method || 'HEAD' == req.method)) {134 if (!this.get('ETag')) {135 this.set('ETag', etag(body));136 }137 }
643 unmodified lines
modified:test/app.head.js+23 added