Created
March 6, 2015 17:40
-
-
Save dydx/7f03e5620f09166ad340 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// so this is a thing that was successfully used to "fix" a headers race condition in an Express app. | |
// Jesus christ this is stupid | |
function(req, res, next) { | |
var originalSend = res.send | |
res.send = function() { | |
if (this.headersSent()) return | |
originalSend.apply(this, arguments) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment