Skip to content

Commit

Permalink
Fix: nghttpx return 400 error (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondkmp authored and Dreamacro committed Jan 7, 2019
1 parent 15a77fa commit 83fac44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adapters/outbound/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ func (h *Http) shakeHand(metadata *C.Metadata, rw io.ReadWriter) error {
var buf bytes.Buffer
var err error

buf.WriteString("CONNECT ")
buf.WriteString(net.JoinHostPort(metadata.Host, metadata.Port))
buf.WriteString(" HTTP/1.1\r\n")
addr := net.JoinHostPort(metadata.Host, metadata.Port)
buf.WriteString("CONNECT " + addr + " HTTP/1.1\r\n")
buf.WriteString("Host: " + metadata.Host + "\r\n")
buf.WriteString("Proxy-Connection: Keep-Alive\r\n")

if h.user != "" && h.pass != "" {
Expand Down

0 comments on commit 83fac44

Please sign in to comment.