correct crc

correct volume id lookup
This commit is contained in:
Chris Lu
2012-09-25 15:37:13 -07:00
parent ca8c8a56b7
commit ac5f227aae
5 changed files with 34 additions and 5 deletions

View File

@@ -79,6 +79,7 @@ func GetHandler(w http.ResponseWriter, r *http.Request) {
if err == nil {
http.Redirect(w, r, "http://"+lookupResult.Locations[0].PublicUrl+r.URL.Path, http.StatusMovedPermanently)
} else {
log.Println("lookup error:", err)
w.WriteHeader(http.StatusNotFound)
}
return
@@ -89,6 +90,7 @@ func GetHandler(w http.ResponseWriter, r *http.Request) {
log.Println("read bytes", count, "error", e)
}
if e != nil || count <= 0 {
log.Println("read error:", e)
w.WriteHeader(http.StatusNotFound)
return
}