http parsing in node?

47 views
Skip to first unread message

Gregg Caines

unread,
Jun 10, 2013, 6:07:06 PM6/10/13
to nod...@googlegroups.com
Does anyone know if the core lib exposes the http parser somehow?  Or if there's a package on npm worth using for http parsing?  I saw a few packages but they look mostly abandoned.

I'm looking for something smart enough to handle real (and trickier) requests, like chunked encoding.

Thanks!

G

Daniel Rinehart

unread,
Jun 10, 2013, 7:09:04 PM6/10/13
to nodejs
One of the common recommended packages is: https://github.com/substack/node-parsley

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tim Caswell

unread,
Jun 10, 2013, 10:04:25 PM6/10/13
to nod...@googlegroups.com
The core http parser is exposed via the private APIs just look at the source of http.js in node's source.  I will warn however that it does seem to change between versions as the node core team tries to make every release faster than the last.

I've written a couple pure-js http parsers, they are not complete yet though.  If you use my latest one, I'll keep on working on it since I need it for my js-git project.

Gregg Caines

unread,
Jun 10, 2013, 10:49:50 PM6/10/13
to nod...@googlegroups.com
Good start.  Is there any reason you don't try for node-style request and response streams as an interface?

Also, this just looks like the server side of things (decoding requests / encoding responses).  Is that right?  Any plans for the client side?

Thanks,

G


You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/riob-diPHSw/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.

Tim Caswell

unread,
Jun 10, 2013, 11:58:19 PM6/10/13
to nod...@googlegroups.com
On Mon, Jun 10, 2013 at 9:49 PM, Gregg Caines <gr...@caines.ca> wrote:
Good start.  Is there any reason you don't try for node-style request and response streams as an interface?

Because node style streams are a fairly complex interface and I use this in the browser too.  No need to bring over such a large API.
 

Also, this just looks like the server side of things (decoding requests / encoding responses).  Is that right?  Any plans for the client side?

Yes, I especially need client-side for git clone and push over http.
Reply all
Reply to author
Forward
0 new messages