Skip to content

Commit 798b2f1

Browse files
kaelzhangshellscape
authored andcommitted
Avoid setting http status code explicitly (#175)
fixes #174 - don't set explicit status code
1 parent 1e01626 commit 798b2f1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

middleware.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ module.exports = function(compiler, options) {
6969
res.setHeader(name, context.options.headers[name]);
7070
}
7171
}
72-
// Express automatically sets the statusCode to 200, but not all servers do (Koa).
73-
res.statusCode = res.statusCode || 200;
72+
7473
if(res.send) res.send(content);
7574
else res.end(content);
7675
}

0 commit comments

Comments
 (0)