Ok. Let me rephrase the question:

I am inside connectionHandler of net.createServer. Now when I determine the 
data from client is HTTP request, I want to convert it to HTTPRequest 
object so that I can leverage the HTTP headers, status code parsing etc.

It is some client requirement where the proxy has to listen to http, https 
and custom protocol on same port.

On Wednesday, 6 February 2013 10:58:07 UTC-8, V'Raj Kanwade wrote:
>
> I am building a proxy server which needs to listen for both http and https 
> proxy on same port.
>
> http.createServer does not call response handler for https traffic.
>
> So I created the server using net.createServer. The question I have is, 
> how can I leverage the http functionality once I have the input request?
>
> For eg. when I see the start of request is GET http://nodejs.org/HTTP/1.1, I 
> want to convert it into a http request so that the headers etc 
> are parsed accordingly and if the request starts with CONNECT, I can 
> implement my own tunneling?
>

-- 
-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to