Skip to content

Commit

Permalink
if gzip,deflate use getBuffer; resolves #30
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>
  • Loading branch information
mkozjak committed May 10, 2017
1 parent f7b59a3 commit e34e661
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ class Cache {
this[key] = headers[key]
}

if (this.type === 'application/octet-stream' || this.type.indexOf('image/') !== -1)
if (this.type === 'application/octet-stream' ||
this.type.indexOf('image/') !== -1 ||
this.request.acceptsEncodings([ 'gzip', 'deflate' ]))
body = yield that.store.getBuffer(requestKeyBody)
else
body = yield that.store.get(requestKeyBody)
Expand Down

0 comments on commit e34e661

Please sign in to comment.