http: Clean up parser usage
authorisaacs <i@izs.me>
Fri, 4 May 2012 17:40:27 +0000 (10:40 -0700)
committerisaacs <i@izs.me>
Fri, 4 May 2012 21:58:30 +0000 (14:58 -0700)
commit1de43149bbb8c42b80cef4c25509390f3b4000cc
treeb7a81089f45cc8d7bb6ae1fe752007582de4e212
parenta9fc63f7a188fd96db656a5bef940b4ed2076560
http: Clean up parser usage

Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.

Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.

Conflicts:

lib/http.js
lib/http.js