Patching http.serverResponse ?! #814

Closed
andreineculau opened this Issue May 22, 2013 · 3 comments

2 participants

@andreineculau

I've only now became aware that connect is patching the prototype of http.serverResponse in https://github.com/senchalabs/connect/blob/master/lib/patch.js

Surely there are better ways than that.

@tj
Sencha Labs member
tj commented May 22, 2013

not really, node core has inadequate support for many things, similar should be in core if it's to be useful for anyone else

@tj tj closed this May 22, 2013
@andreineculau

I can only agree with you that node's core/http has issues, but those should be solved in node's codebase, rather than in monkey-patches (with inadequate support themselves -- e.g. just blindly attaching a charset param to content-type; maybe it already has one).

There's a reason why people say no to Prototype.js ...

@tj
Sencha Labs member
tj commented May 22, 2013

they certainly should be, but we can't wait around for core to finally figure out that it's not useful. It took roughly a year to get .setHeader() etc in when I said writeHead was too inflexible, it'll be another year before things like this get in if ever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment