Forráskód Böngészése

Include HTTP status code in upstream proxy errors

Rod Hynes 11 éve
szülő
commit
9a9be02eec
1 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 2
      psiphon/net.go

+ 1 - 2
psiphon/net.go

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