File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,18 @@ unreleased
33
44 * Send complete HTML document in redirect response
55 * Set default CSP header in redirect response
6+ * deps: send@0.15.0
7+ - Fix false detection of ` no-cache ` request directive
8+ - Fix incorrect result when ` If-None-Match ` has both ` * ` and ETags
9+ - Fix weak ` ETag ` matching to match spec
10+ - Remove usage of ` res._headers ` private field
11+ - Support ` If-Match ` and ` If-Unmodified-Since ` headers
12+ - Use ` res.getHeaderNames() ` when available
13+ - Use ` res.headersSent ` when available
14+ - deps: debug@2.6.1
15+ - deps: etag@~ 1.8.0
16+ - deps: fresh@0.5.0
17+ - deps: http-errors@~ 1.6.1
618
7191.11.2 / 2017-01-23
820===================
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ function createNotFoundDirectoryListener () {
179179 */
180180
181181function createRedirectDirectoryListener ( ) {
182- return function redirect ( ) {
182+ return function redirect ( res ) {
183183 if ( this . hasTrailingSlash ( ) ) {
184184 this . error ( 404 )
185185 return
@@ -196,7 +196,6 @@ function createRedirectDirectoryListener () {
196196 var loc = encodeUrl ( url . format ( originalUrl ) )
197197 var doc = createHtmlDocument ( 'Redirecting' , 'Redirecting to <a href="' + escapeHtml ( loc ) + '">' +
198198 escapeHtml ( loc ) + '</a>' )
199- var res = this . res
200199
201200 // send redirect response
202201 res . statusCode = 301
Original file line number Diff line number Diff line change 99 "encodeurl" : " ~1.0.1" ,
1010 "escape-html" : " ~1.0.3" ,
1111 "parseurl" : " ~1.3.1" ,
12- "send" : " 0.14.2 "
12+ "send" : " 0.15.0 "
1313 },
1414 "devDependencies" : {
1515 "eslint" : " 3.16.1" ,
Original file line number Diff line number Diff line change @@ -108,6 +108,13 @@ describe('serveStatic()', function () {
108108 } )
109109 } )
110110
111+ it ( 'should support precondition checks' , function ( done ) {
112+ request ( server )
113+ . get ( '/todo.txt' )
114+ . set ( 'If-Match' , '"foo"' )
115+ . expect ( 412 , done )
116+ } )
117+
111118 it ( 'should serve zero-length files' , function ( done ) {
112119 request ( server )
113120 . get ( '/empty.txt' )
You can’t perform that action at this time.
0 commit comments