Skip to content

Commit

Permalink
tests: add Vary with HEAD test
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jul 6, 2014
1 parent 3e3292f commit 1d845f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ describe('compress()', function(){
})
})

it('should set Vary for HEAD request', function(done){
var server = createServer({ threshold: 0 }, function (req, res) {
res.setHeader('Content-Type', 'text/plain')
res.end('hello, world')
})

request(server)
.head('/')
.set('Accept-Encoding', 'gzip')
.expect('Vary', 'Accept-Encoding', done)
})

it('should transfer chunked', function(done){
var server = createServer({ threshold: 0 }, function (req, res) {
res.setHeader('Content-Type', 'text/plain')
Expand Down

0 comments on commit 1d845f9

Please sign in to comment.