Fix: nghttpx return 400 error (#84)
This commit is contained in:
parent
15a77fa71b
commit
83fac44010
1 changed files with 3 additions and 3 deletions
|
@ -58,9 +58,9 @@ func (h *Http) shakeHand(metadata *C.Metadata, rw io.ReadWriter) error {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
buf.WriteString("CONNECT ")
|
addr := net.JoinHostPort(metadata.Host, metadata.Port)
|
||||||
buf.WriteString(net.JoinHostPort(metadata.Host, metadata.Port))
|
buf.WriteString("CONNECT " + addr + " HTTP/1.1\r\n")
|
||||||
buf.WriteString(" HTTP/1.1\r\n")
|
buf.WriteString("Host: " + metadata.Host + "\r\n")
|
||||||
buf.WriteString("Proxy-Connection: Keep-Alive\r\n")
|
buf.WriteString("Proxy-Connection: Keep-Alive\r\n")
|
||||||
|
|
||||||
if h.user != "" && h.pass != "" {
|
if h.user != "" && h.pass != "" {
|
||||||
|
|
Loading…
Reference in a new issue