From fdd631477622bdb475a6078007ea2975b2231175 Mon Sep 17 00:00:00 2001 From: Josh Hawn Date: Thu, 12 Mar 2015 17:06:40 -0700 Subject: [PATCH] Insert request method option storage driver URLFor Docker-DCO-1.1-Signed-off-by: Josh Hawn (github: jlhawn) --- docs/storage/layerreader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/storage/layerreader.go b/docs/storage/layerreader.go index 1129eb9e..9d6d8c8a 100644 --- a/docs/storage/layerreader.go +++ b/docs/storage/layerreader.go @@ -38,7 +38,7 @@ func (lr *layerReader) Close() error { func (lr *layerReader) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Docker-Content-Digest", lr.digest.String()) - if url, err := lr.fileReader.driver.URLFor(lr.path, map[string]interface{}{}); err == nil { + if url, err := lr.fileReader.driver.URLFor(lr.path, map[string]interface{}{"method": r.Method}); err == nil { http.Redirect(w, r, url, http.StatusTemporaryRedirect) } http.ServeContent(w, r, lr.digest.String(), lr.CreatedAt(), lr)