github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/doc/protocol/blob-get-protocol.txt (about) 1 The /camli/<blobref> endpoint returns a blob the server knows about. 2 3 A request with the GET verb will return 200 and the blob contents if 4 present, 404 if not. A request with the HEAD verb will return 200 and 5 the blob meta data (i.e., content-length), or 404 if the blob is not 6 present. 7 8 The response must include an explicit Content-Length, even with HTTP/1.1. 9 (The one piece of metadata a blobserver keeps on a blob is its length, 10 which is used in both enumerate-blobs bodies and responses to blob GETs.) 11 12 Get the blob: 13 14 GET /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1 15 Host: example.com 16 17 Response: 18 19 HTTP/1.1 200 OK 20 Content-Type: application/octet-stream 21 Content-Length: <the blob length in bytes> 22 23 <the blob contents> 24 25 26 Existence check: 27 28 HEAD /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1 29 Host: example.com 30 31 Response: 32 33 HTTP/1.1 200 OK 34 Content-Type: application/octet-stream 35 Content-Length: <the blob length in bytes> 36 37 38 Does not exist: 39 40 GET /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1 41 Host: example.com 42 43 Response: 44 45 HTTP/1.1 404 OK 46