mirror of https://github.com/goproxyio/goproxy
Answer faster in case of non-supported checksum database
parent
a7300372df
commit
94fcf94f0a
|
@ -35,12 +35,17 @@ func Handler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, supported := range supportedSumDB {
|
if strings.HasSuffix(r.URL.Path, "/supported") {
|
||||||
uri := fmt.Sprintf("/sumdb/%s/supported", supported)
|
for _, supported := range supportedSumDB {
|
||||||
if r.URL.Path == uri {
|
uri := fmt.Sprintf("/sumdb/%s/supported", supported)
|
||||||
w.WriteHeader(http.StatusOK)
|
if r.URL.Path == uri {
|
||||||
return
|
w.WriteHeader(http.StatusOK)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w.WriteHeader(http.StatusGone)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p := "https://" + strings.TrimPrefix(r.URL.Path, "/sumdb/")
|
p := "https://" + strings.TrimPrefix(r.URL.Path, "/sumdb/")
|
||||||
|
|
Loading…
Reference in New Issue