Skip to content

Commit

Permalink
Change usage of _header to headersSernt
Browse files Browse the repository at this point in the history
  • Loading branch information
maritz committed Jan 10, 2018
1 parent b5dc3bb commit de4f632
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function compression (options) {
return false
}

if (!this._header) {
if (!this.headersSent) {
this.writeHead(this.statusCode)
}

Expand All @@ -94,7 +94,7 @@ function compression (options) {
return false
}

if (!this._header) {
if (!this.headersSent) {
// estimate the length
if (!this.getHeader('Content-Length')) {
length = chunkLength(chunk, encoding)
Expand Down

0 comments on commit de4f632

Please sign in to comment.