Conversation
Adds a `version` option to `http.request()`. Defaults to '1.1' for backwards compatibility.
@ry I know this is a touchy subject for you. Can you review the patch? |
Looking at this again this might not be needed and can instead be done with
What I'm not sure about now is how to stream |
With a bit of work. Pass a custom |
Hmm, that's going over my head. |
Why do you need this? What does your proxy do with HTTP/1.1 clients? Our client is HTTP/1.1 and should not ever need to pretend to be HTTP/1.0. You must justify why what this is needed. |
The HTTP/1.0 request is needed to use the CONNECT verb create a tunnel to send HTTPS requests via a HTTP proxy. That said this probably wouldn't be the best place for it given what @bnoordhuis has said and this pull request can be closed. |
Why do you need 1.0 for CONNECT |
Doing some further tests it's not the 1.0 that's the problem, it's the
should fix it. |
that would be an acceptable change. https://github.com/joyent/node/blob/20035931433a87e53d3726ec86fd5eedfed2c3fb/lib/http.js#L1027 |
I patched a local clone (cloned from v0.6) and it worked against the proxy but when writing a test for it it seems that a server created by The following works and prints 200:
If I change
I know with CONNECT that |
|
Whitman, how did you get it to work with your proxy? What kind of proxy are you using? I ran into the same issue today and am struggling to get it to work (apache and mod_proxy) even with Transfer-Encoding: chunked disabled. Where I stumble is how you would be able to write back out to it after you do the connect. |
I couldn't get it to work in the end. I could |
Our work proxy requires a HTTP/1.0 CONNECT to tunnel HTTPS over HTTP. This patch adds the ability to specify which HTTP version should be used with
http.request()
. Defaults to'1.1'
for backwards compatibility.