Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-13 Thread Stéphan Kochen
On 13 April 2012 08:53, Brian wrote: > As a counterpoint, my boss's boss at my previous job had enabled pipelining > in Firefox through about:config editor because he was trying to improve > performance, and we ended up with bug reports for our app because our J2EE > app didn't respond in order wi

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Brian
On Thu, Apr 12, 2012 at 11:41 PM, Stéphan Kochen wrote: > You mention some valid points, which I believe I tackled in the branch, at > the cost of breaking API. I'm just going to explain how that works, but I > currently have no way of doing this _without_ breaking API. > > On Friday 13 April 2012

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Stéphan Kochen
You mention some valid points, which I believe I tackled in the branch, at the cost of breaking API. I'm just going to explain how that works, but I currently have no way of doing this _without_ breaking API. On Friday 13 April 2012 at 00:38, Brian wrote: > That's probably still not enough, bec

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Brian
That's probably still not enough, because you need to be able to push data out the socket immediately after the actual HTTP response, ideally even in the same TCP frame if possible. So calling response.end() doesn't make sense, and letting that stuff be transparently queued doesn't make sense, bec

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Stéphan Kochen
On Friday 13 April 2012 at 00:20, Mikeal Rogers wrote: > So, without getting too deep in to the API proposal, you'd like the "upgrade" > event to be passed an HTTP ServerResponse object? Yep. :) -- Stéphan Kochen Two Screen, Angry Bytes

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Mikeal Rogers
On Apr 12, 2012, at April 12, 20122:59 PM, Stéphan Kochen wrote: > On Thursday 12 April 2012 at 23:37, Mikeal Rogers wrote: >> The thing is, once there is an UPGRADE, it's not HTTP anymore. > > HTTP still specifies that Upgrade must be followed by a response. HTTP only > stops when the response

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Stéphan Kochen
On Thursday 12 April 2012 at 23:37, Mikeal Rogers wrote: > The thing is, once there is an UPGRADE, it's not HTTP anymore. HTTP still specifies that Upgrade must be followed by a response. HTTP only stops when the response is a 101, and the headers have been sent. > Node doesn't offer any core API

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Stéphan Kochen
On Thursday 12 April 2012 at 23:13, Isaac Schlueter wrote: > This is definitely a wart in the API, but not one that we're likely to > fix in v0.8. It may require rethinking a few things, and we are not > prepared to make major changes to the HTTP layer right now. Noted. This seems to be the consen

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Mikeal Rogers
The thing is, once there is an UPGRADE, it's not HTTP anymore. For all intents and purposes websockets are NOT HTTP and can't be handled as such. Node doesn't offer any core API objects for parsing and encoding to websockets, it pushes all of that to higher level libraries like socket.io, so th

Re: [node-dev] Re: On HTTP Upgrade requests and responses

2012-04-12 Thread Isaac Schlueter
This is definitely a wart in the API, but not one that we're likely to fix in v0.8. It may require rethinking a few things, and we are not prepared to make major changes to the HTTP layer right now. Can you write up the feature request as an issue? Let's get it on the list for v0.9. 2012/3/29 S