Skip to content

Commit

Permalink
Add support for http2
Browse files Browse the repository at this point in the history
The change just removes the usage of undocumented http API and instead uses the proper writeHead method
  • Loading branch information
maritz committed Jan 10, 2018
1 parent 1604fde commit b5dc3bb
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 @@ -81,7 +81,7 @@ function compression (options) {
}

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

return stream
Expand All @@ -100,7 +100,7 @@ function compression (options) {
length = chunkLength(chunk, encoding)
}

this._implicitHeader()
this.writeHead(this.statusCode)
}

if (!stream) {
Expand Down

0 comments on commit b5dc3bb

Please sign in to comment.