diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 15:09:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 15:09:49 +0300 |
commit | dcf94a76413ddb50148bdac7b189afb7bffa7580 (patch) | |
tree | b5ecff1d1aea4d3ad95d728531f95f80c00a47ca /workhorse/internal | |
parent | a350f877c4246fee981690388239d1e19e17202a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal')
-rw-r--r-- | workhorse/internal/httprs/httprs_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/workhorse/internal/httprs/httprs_test.go b/workhorse/internal/httprs/httprs_test.go index 62279d895c9..e26d2d21215 100644 --- a/workhorse/internal/httprs/httprs_test.go +++ b/workhorse/internal/httprs/httprs_test.go @@ -53,6 +53,10 @@ func (f *fakeRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { if err != nil { return nil, err } + if err := os.Remove(fw.tmp.Name()); err != nil { + return nil, err + } + if f.downgradeZeroToNoRange { // There are implementations that downgrades bytes=0- to a normal un-ranged GET if r.Header.Get("Range") == "bytes=0-" { @@ -79,6 +83,10 @@ func newRSFactory(flags int) RSFactory { if err != nil { return nil } + if err := os.Remove(tmp.Name()); err != nil { + return nil + } + for i := 0; i < SZ; i++ { tmp.WriteString(fmt.Sprintf("%04d", i)) } |