Clients that support non-preemptive authentication

example client: okhttp <= 3.11.0
This commit is contained in:
fzhyzamt 2020-06-15 17:26:59 +08:00 committed by GitHub
parent 2406ecdfea
commit e15fa11007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,6 +231,7 @@ func removeProxyHeaders(req *http.Request) {
func getBadResponse() *http.Response { func getBadResponse() *http.Response {
header := make(map[string][]string) header := make(map[string][]string)
header["Proxy-Authenticate"] = []string{"Basic"} header["Proxy-Authenticate"] = []string{"Basic"}
header["Connection"] = []string{"close"}
res := &http.Response{ res := &http.Response{
Status: "407 Not authorized", Status: "407 Not authorized",
StatusCode: 407, StatusCode: 407,