@node Install
@unnumbered Install
-@set VERSION 2.2.0
+@set VERSION 2.3.0
Preferable way is to download tarball with the signature from
website and, for example, run tests with benchmarks:
http.Error(w, err.Error(), http.StatusBadGateway)
return false
}
+ if resp.StatusCode != http.StatusOK {
+ resp.Body.Close()
+ log.Println("error", r.RemoteAddr, "refresh", pkgName, "HTTP status:", resp.Status)
+ http.Error(w, "PyPI has non 200 status code", http.StatusBadGateway)
+ return false
+ }
body, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return false
}
defer resp.Body.Close()
+ if resp.StatusCode != http.StatusOK {
+ log.Println(
+ "error", r.RemoteAddr,
+ "pypi", filename, "download",
+ "HTTP status:", resp.Status,
+ )
+ http.Error(w, "PyPI has non 200 status code", http.StatusBadGateway)
+ return false
+ }
hasher := hasherNew()
hasherSHA256 := sha256.New()
dst, err := TempFile(dirPath)