diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2013-01-02 16:28:28 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2013-01-02 17:06:30 +0000 |
commit | 22d1bfbc91a46134dd6c9410b86a3cb3ba250887 (patch) | |
tree | 6594a29910668e0845fed69d37747b98102d5014 /morphcacheserver/repocache.py | |
parent | 74df327db1727a26986cdf63294ae93cf3106081 (diff) | |
download | morph-22d1bfbc91a46134dd6c9410b86a3cb3ba250887.tar.gz |
Handle batch sha1/file queries using POST requests
This commit adds support for resolving multiple refs into SHA1s and
requesting multiple files at once, each using a single POST request.
The (repo, ref) and (repo, ref, filename) parameters are passed to
the POST requests as JSON dictionaries in a list. The response to
both types of requests is a JSON list with the same dictionaries
again, to which a "sha1" and "data" field are added, respectively.
The file contents returned by "POST /1.0/files" requests are
base64-encoded and need to be decoded at the receiver's end. This
is because the contents may be binary or contain quotes and
therefore cause JSON syntax errors.
Diffstat (limited to 'morphcacheserver/repocache.py')
0 files changed, 0 insertions, 0 deletions