cloudhead / node-static

rfc 2616 compliant HTTP static-file server module, with built-in caching.
MIT License
2.17k stars 245 forks source link

[writeHead] survive if http.serverResponse.writeHead() re-defined #166

Closed mrose17 closed 2 years ago

mrose17 commented 9 years ago

apparently one of the libraries used in my project redefines http.serverResponse's writeHead() ... you have to love those javascript frameworks. anyway, this "fix" will work regardless of whether or not writeHead() has been changed. thanks!

brettz9 commented 3 years ago

As mentioned in #224, I guess we could protect overwrites to writeHead, but what's to prevent someone from rewriting setHeader? If it's a common enough use case to overwrite writeHead, I could add the preventative measure, esp. with a test. Thanks!

brettz9 commented 2 years ago

Closing as no response, but feel free to file a new PR/issue if you can clarify per https://github.com/cloudhead/node-static/pull/166#:~:text=commented-,on%20Jul%2024%2C%202021,-As%20mentioned%20in