(rw http.ResponseWriter, req *http.Request)
| 50 | } |
| 51 | |
| 52 | func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { |
| 53 | blobRef := blobFromURLPath(req.URL.Path) |
| 54 | if !blobRef.Valid() { |
| 55 | http.Error(rw, "Malformed GET URL.", http.StatusBadRequest) |
| 56 | return |
| 57 | } |
| 58 | |
| 59 | ServeBlobRef(rw, req, blobRef, h.Fetcher) |
| 60 | } |
| 61 | |
| 62 | // ServeBlobRef serves a blob. |
| 63 | func ServeBlobRef(rw http.ResponseWriter, req *http.Request, blobRef blob.Ref, fetcher blob.Fetcher) { |
nothing calls this directly
no test coverage detected