Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Help expose HTTP header boundary
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Charlie Robbins  
View profile  
 More options Feb 12 2012, 5:50 pm
From: Charlie Robbins <charlie.robb...@gmail.com>
Date: Sun, 12 Feb 2012 17:50:59 -0500
Local: Sun, Feb 12 2012 5:50 pm
Subject: Help expose HTTP header boundary

All,

I spoke with ry and substack about this issue when I was in San Francisco
last month: https://github.com/joyent/node/issues/2612. If I remember
correctly, it requires small changes to http-parser and the node wrapper. I
don't know this code base at all so I'm looking for someone to help
implement it.

The purpose here is to make HTTP proxying much simpler. The proxy logic in
node-http-proxy right now is implemented through an http.Server instance.
This fix would allow it to be implemented through a net.Server instance
using this logic:

1. Create a net server.
(for each connection)
2. Buffer chunks and execute them against an HTTPParser instance.
3. Slice the HTTP headers from first one (or two) chunks, edit them, and
serialize them.
4. Flush the buffer to the outgoing reverse proxy request.

It is impossible to do (3) properly without this fix. I have a branch of
node-http-proxy which performs a naive slice looking for the first
occurance of `\r\n\r\n`.
https://github.com/nodejitsu/node-http-proxy/blob/experimental/lib/ba....
After some initial tests this approach is too naive and won't work in
production.

Any help here would be fantastic.

Thanks,
Charlie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Noordhuis  
View profile  
 More options Feb 12 2012, 9:24 pm
From: Ben Noordhuis <i...@bnoordhuis.nl>
Date: Mon, 13 Feb 2012 03:24:58 +0100
Local: Sun, Feb 12 2012 9:24 pm
Subject: Re: [node-dev] Help expose HTTP header boundary
On Sun, Feb 12, 2012 at 23:50, Charlie Robbins

I don't quite understand the issue. You want the total size of the HTTP headers?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charlie Robbins  
View profile  
 More options Feb 12 2012, 10:06 pm
From: Charlie Robbins <charlie.robb...@gmail.com>
Date: Sun, 12 Feb 2012 22:06:45 -0500
Local: Sun, Feb 12 2012 10:06 pm
Subject: Re: [node-dev] Help expose HTTP header boundary

Yes. In reverse-proxying scenarios one must rewrite the incoming headers
before a second outbound request is made to the proxy target. Examples:

* `x-forwarded-*` headers
* https:// to http:// support often requires rewriting location headers.
* wss:// to ws:// WebSocket support: must rewrite the x-websocket-origin
header (among others, don't have the spec off-hand)

In the two most popular current implementations:

* node-http-proxy: Reads the incoming headers off of the http.ServerRequest
object, modifies them, and then makes an outbound request to the reverse
proxy target via http.request
* bouncy: Works behind a net.Server instance, but performs all HTTP header
parsing in pure Javascript to work around the lack of framing from the core
http-parser.

mmalecki has fixed this and should be opening pull requests tonight or
tomorrow. We'll be working on a new version of node-http-proxy which takes
advantage of them after they're merged. Personally I consider this more of
a bugfix than a feature.

--Charlie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikeal Rogers  
View profile  
 More options Feb 13 2012, 12:26 am
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Sun, 12 Feb 2012 21:26:00 -0800
Subject: Re: [node-dev] Help expose HTTP header boundary

I am all for this going in but I'm wondering why we have a thread on the list about it when we have a pretty good GitHub issue already?

Was there something that we need to discuss that's not in ticket/upcoming-pull-request?

On Feb 12, 2012, at February 12, 20127:06 PM, Charlie Robbins wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charlie Robbins  
View profile  
 More options Feb 13 2012, 11:27 am
From: Charlie Robbins <charlie.robb...@gmail.com>
Date: Mon, 13 Feb 2012 11:27:50 -0500
Local: Mon, Feb 13 2012 11:27 am
Subject: Re: [node-dev] Help expose HTTP header boundary

This thread was not about discussing the issue at hand, but helping to find
someone to actually contribute the dev hours b/c I'm not familiar enough
with the http-parser codebase. mmalecki stepped up so I agree, lets move
any further discussion to the pull request:

https://github.com/joyent/http-parser/pull/89#issuecomment-3940686

On Mon, Feb 13, 2012 at 12:26 AM, Mikeal Rogers <mikeal.rog...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »