Browse Source

Include HTTP status code in upstream proxy errors

Rod Hynes 11 years ago
parent
commit
9a9be02eec
1 changed files with 1 additions and 2 deletions
  1. 1 2
      psiphon/net.go

+ 1 - 2
psiphon/net.go

@@ -26,7 +26,6 @@ import (
 	"io"
 	"net"
 	"net/http"
-	"strings"
 	"sync"
 	"time"
 
@@ -194,7 +193,7 @@ func HttpProxyConnect(rawConn net.Conn, addr string) (err error) {
 		return ContextError(err)
 	}
 	if response.StatusCode != 200 {
-		return ContextError(errors.New(strings.SplitN(response.Status, " ", 2)[1]))
+		return ContextError(errors.New(response.Status))
 	}
 
 	return nil