aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/api.go')
-rw-r--r--swarm/api/api.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/swarm/api/api.go b/swarm/api/api.go
index a5941fb5c..79de29a1c 100644
--- a/swarm/api/api.go
+++ b/swarm/api/api.go
@@ -144,9 +144,13 @@ func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionRe
if entry != nil {
key = common.Hex2Bytes(entry.Hash)
status = entry.Status
- mimeType = entry.ContentType
- log.Trace(fmt.Sprintf("content lookup key: '%v' (%v)", key, mimeType))
- reader = self.dpa.Retrieve(key)
+ if status == http.StatusMultipleChoices {
+ return
+ } else {
+ mimeType = entry.ContentType
+ log.Trace(fmt.Sprintf("content lookup key: '%v' (%v)", key, mimeType))
+ reader = self.dpa.Retrieve(key)
+ }
} else {
status = http.StatusNotFound
err = fmt.Errorf("manifest entry for '%s' not found", path)