Skip to content

Commit de4f632

Browse files
author
Moritz Peters
committed
Change usage of _header to headersSernt
1 parent b5dc3bb commit de4f632

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function compression (options) {
8080
return false
8181
}
8282

83-
if (!this._header) {
83+
if (!this.headersSent) {
8484
this.writeHead(this.statusCode)
8585
}
8686

@@ -94,7 +94,7 @@ function compression (options) {
9494
return false
9595
}
9696

97-
if (!this._header) {
97+
if (!this.headersSent) {
9898
// estimate the length
9999
if (!this.getHeader('Content-Length')) {
100100
length = chunkLength(chunk, encoding)

0 commit comments

Comments
 (0)