cloudhead / http-console

simple, intuitive HTTP REPL — Speak HTTP like a local.
Apache License 2.0
1.35k stars 65 forks source link

TypeError when using --cookies #18

Closed s4y closed 13 years ago

s4y commented 13 years ago

When http-console tries to store a cookie, this happens:

TypeError: Object myCoolWebApp_session=4d03fceabee6760485000002; HttpOnly has no method 'split'
    at [object Object].rememberCookies (/usr/local/lib/node/.npm/http-console/0.5.1/package/lib/http-console.js:267:44)
    at ClientRequest.<anonymous> (/usr/local/lib/node/.npm/http-console/0.5.1/package/lib/http-console.js:115:54)
    at ClientRequest.emit (events.js:27:15)
    at HTTPParser.onIncoming (http.js:987:9)
    at HTTPParser.onHeadersComplete (http.js:88:31)
    at Client.onData [as ondata] (http.js:880:27)
    at Client._onReadable (net.js:566:27)
    at IOWatcher.onReadable [as callback] (net.js:151:10)

It looks like whatever is in the headers array here is not a proper string.

ryankirkman commented 13 years ago

This is happening for me with express.js.

arunjitsingh commented 13 years ago

I'm getting exactly the same error. I'm using Express.js with cookieParser and session.

jdreux commented 13 years ago

Same here, with the same setup as Arunjit. This prevents me from using this tool for my testing.

s4y commented 13 years ago

Guys, it looks like this was fixed in 7b4e85c49c4c30ef4850eb964f8b1edfe5b62d68.

I just pinged cloudhead about getting npm updated, but for now installing it from the GitHub repo should do the trick.