git ssb

30+

cel / git-ssb-web



Commit ebbef91f252638540e837f6a111d16e0c503983b

Fix serving blobs

Charles Lehner committed on 4/15/2016, 6:13:13 PM
Parent: c41b8297c7ac5978b6a4bc7b4115c2302c128e6e

Files changed

index.jschanged
index.jsView
@@ -1930,12 +1930,14 @@
19301930 })
19311931 }
19321932
19331933 function serveBlob(req, key) {
1934- getBlob(req, key, function (err, read) {
1935- if (err) cb(null, serveError(req, err))
1936- else if (!got) cb(null, serve404(req))
1937- else cb(null, serveRaw()(read))
1934+ return readNext(function (cb) {
1935+ getBlob(req, key, function (err, read) {
1936+ if (err) cb(null, serveError(req, err))
1937+ else if (!read) cb(null, serve404(req))
1938+ else cb(null, serveRaw()(read))
1939+ })
19381940 })
19391941 }
19401942
19411943 /* Digs */

Built with git-ssb-web