support non-preemptive authentication (#1888)

This commit is contained in:
fzhyzamt 2020-07-01 11:18:23 +08:00 committed by GitHub
parent b23548eeff
commit b1181fd17a
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 {
header := make(map[string][]string)
header["Proxy-Authenticate"] = []string{"Basic"}
header["Connection"] = []string{"close"}
res := &http.Response{
Status: "407 Not authorized",
StatusCode: 407,