You're viewing a comment by eugene and its responses.

April 28, 2010, 14:15

//var proxy = http.createClient(80, request.headers['host'])

This line means that the proxy is only HTTP1.1 compatible

Comment Responses

April 28, 2010, 15:21

Well there is HTTP 1.0 and HTTP 1.1. What do you mean then by only?

April 28, 2010, 17:28

Why port 80 only? some webservers run on alternate ports.

April 29, 2010, 14:09

Port 80 because I wanted the code to fit in 20 lines.

You can just split on ':' on request.url and see if another port is specified...

April 30, 2010, 07:33

Header 'host' present in http-headers since v1.1 You must parse URL in first-line of http request.

April 30, 2010, 15:48

I am just forwarding all headers, the 'host' is in there!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "antispam": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.