@cryptotaxi247 / kubo / commits / 4537311f5

http gw: disable PUT and writable tests - again... :(

Henry committed May 9, 2015 at 11:21 UTC 4537311f59ceff8688bd8b27e128893c6261a7be
1 file changed +3 -5
core/corehttp/gateway_handler.go
+3 -5
@@ -10,7 +10,6 @@ import (
10 "strings"
11 "time"
12
13 - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
13 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
14
15 core "github.com/ipfs/go-ipfs/core"
@@ -234,9 +233,8 @@ func (i *gatewayHandler) postHandler(w http.ResponseWriter, r *http.Request) {
233 return
234 }
235
237 - h := mh.Multihash(k).B58String()
238 - w.Header().Set("IPFS-Hash", h)
239 - http.Redirect(w, r, ipfsPathPrefix+h, http.StatusCreated)
236 + w.Header().Set("IPFS-Hash", k.String())
237 + http.Redirect(w, r, ipfsPathPrefix+k.String(), http.StatusCreated)
238 }
239
240 func (i *gatewayHandler) putEmptyDirHandler(w http.ResponseWriter, r *http.Request) {
@@ -253,7 +251,7 @@ func (i *gatewayHandler) putEmptyDirHandler(w http.ResponseWriter, r *http.Reque
251 }
252
253 func (i *gatewayHandler) putHandler(w http.ResponseWriter, r *http.Request) {
256 - // TODO(cryptix): will be resolved in PR#1191
254 + // TODO(cryptix): either ask mildred about the flow of this or rewrite it
255 webErrorWithCode(w, "Sorry, PUT is bugged right now, closing request", errors.New("handler disabled"), http.StatusInternalServerError)
256 return
257 urlPath := r.URL.Path