Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-15 Thread P. Douglas Reeder
FWIW, sending a body with a GET request allows one to send non-ascii parameters and/or large amounts of info. So, there is a use case. On Saturday, July 14, 2012 10:14:42 PM UTC-4, Mikeal Rogers wrote: > > that's not the bug. technically, the HTTP spec allows a body in a GET > request. nobody

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-15 Thread pushpinder rattan
Is the write operation supported in GET request?? I don;t think so.. But it looks like , it should be handled on server side in node.js server?? thanks Pushpinder On Sun, Jul 15, 2012 at 7:44 AM, Mikeal Rogers wrote: > that's not the bug. technically, the HTTP spec allows a body in a GET > r

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread Mikeal Rogers
that's not the bug. technically, the HTTP spec allows a body in a GET request. nobody ever does it, but node's parser supports it. On Jul 14, 2012, at July 14, 20127:10 PM, mscdex wrote: > On Saturday, July 14, 2012 10:01:48 PM UTC-4, Alexey Petrushin wrote: > Hmm, only now noticed it - I'm writ

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread mscdex
On Saturday, July 14, 2012 10:01:48 PM UTC-4, Alexey Petrushin wrote: > > Hmm, only now noticed it - I'm writing data using 'get' method, this also > maybe the cause. Also, you're trying to send a GET request with a body, which doesn't make sense. If you're sending a body, you need to change t

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread Alexey Petrushin
Hmm, only now noticed it - I'm writing data using 'get' method, this also maybe the cause. -- 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 "nod

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread Joshua Holbrook
Probably a race condition between the server listening and the request trying to hit it. Try listening for a ready event from the server before making the request. --Josh On Sat, Jul 14, 2012 at 6:54 PM, Alexey Petrushin wrote: > I'm having strange node.js behavior - using `http.request` for cal

[nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread Alexey Petrushin
I'm having strange node.js behavior - using `http.request` for calling `http.server` in the same process sometimes causes error. This snippet of code will result in error ( https://gist.github.com/3114352 ) // Server returning 'okay' to everyone. require('http').createServer(function(re