]> source.dussan.org Git - gitea.git/commit
repo: Download: restore some semblance of previous behavior
authorKyle Evans <kevans@FreeBSD.org>
Tue, 5 May 2020 23:56:13 +0000 (18:56 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 6 May 2020 00:13:23 +0000 (19:13 -0500)
commitc134aef340376f9a51fe1cf07f185ad407dc0dd4
tree7af685fcac393a8a7310cf624680c2c7d2fb7c18
parent67d491ba7c2a7a06fce00a017a3a561b9823f3c4
repo: Download: restore some semblance of previous behavior

When archival was made async, the GET endpoint was only useful if a previous
POST had initiated the download. This commit restores the previous behavior,
to an extent; we'll now submit the archive request there and return a
"202 Accepted" to indicate that it's processing if we didn't manage to
complete the request within ~2 seconds of submission.

This lets a client directly GET the archive, and gives them some indication
that they may attempt to GET it again at a later time.
routers/repo/repo.go