Skip to content

Commit

Permalink
add changelog, lint, update expected failures
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Jan 6, 2021
1 parent f2de9a7 commit ed436a3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/range-requests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Support range header in GET requests

To allow resuming a download we now support GET requests with a range header.

https://github.com/cs3org/reva/pull/1388
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *svc) handleGet(w http.ResponseWriter, r *http.Request, ns string) {
defer httpRes.Body.Close()

if httpRes.StatusCode != http.StatusOK && httpRes.StatusCode != http.StatusPartialContent {
w.WriteHeader(http.StatusInternalServerError)
w.WriteHeader(httpRes.StatusCode)
return
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/rhttp/datatx/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ import (

// from https://golang.org/src/net/http/fs.go

// errSeeker is returned by ServeContent's sizeFunc when the content
// ErrSeeker is returned by ServeContent's sizeFunc when the content
// doesn't seek properly. The underlying Seeker's error text isn't
// included in the sizeFunc reply so it's not sent over HTTP to end
// users.
var ErrSeeker = errors.New("seeker can't seek")

// errNoOverlap is returned by serveContent's parseRange if first-byte-pos of
// ErrNoOverlap is returned by serveContent's parseRange if first-byte-pos of
// all of the byte-range-spec values is greater than the content size.
var ErrNoOverlap = errors.New("invalid range: failed to overlap")

Expand Down
10 changes: 2 additions & 8 deletions tests/acceptance/expected-failures-on-OCIS-storage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1094,18 +1094,12 @@ apiWebdavOperations/deleteFolder.feature:92
# https://github.com/owncloud/ocis-reva/issues/12 Range Header is not obeyed when downloading a file
# https://github.com/owncloud/core/issues/38006 Review and fix the tests that have sharing step to work with ocis
#
apiWebdavOperations/downloadFile.feature:29
apiWebdavOperations/downloadFile.feature:30
apiWebdavOperations/downloadFile.feature:72
apiWebdavOperations/downloadFile.feature:73
apiWebdavOperations/downloadFile.feature:84
apiWebdavOperations/downloadFile.feature:85
apiWebdavOperations/downloadFile.feature:144
apiWebdavOperations/downloadFile.feature:145
apiWebdavOperations/downloadFile.feature:179
apiWebdavOperations/downloadFile.feature:180
apiWebdavOperations/downloadFile.feature:189
apiWebdavOperations/downloadFile.feature:190
apiWebdavOperations/downloadFile.feature:169
apiWebdavOperations/downloadFile.feature:170
apiWebdavOperations/downloadFile.feature:198
apiWebdavOperations/downloadFile.feature:199
apiWebdavOperations/refuseAccess.feature:21
Expand Down
10 changes: 2 additions & 8 deletions tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1067,18 +1067,12 @@ apiWebdavOperations/deleteFolder.feature:92
# https://github.com/owncloud/ocis-reva/issues/12 Range Header is not obeyed when downloading a file
# https://github.com/owncloud/core/issues/38006 Review and fix the tests that have sharing step to work with ocis
#
apiWebdavOperations/downloadFile.feature:29
apiWebdavOperations/downloadFile.feature:30
apiWebdavOperations/downloadFile.feature:72
apiWebdavOperations/downloadFile.feature:73
apiWebdavOperations/downloadFile.feature:84
apiWebdavOperations/downloadFile.feature:85
apiWebdavOperations/downloadFile.feature:144
apiWebdavOperations/downloadFile.feature:145
apiWebdavOperations/downloadFile.feature:179
apiWebdavOperations/downloadFile.feature:180
apiWebdavOperations/downloadFile.feature:189
apiWebdavOperations/downloadFile.feature:190
apiWebdavOperations/downloadFile.feature:169
apiWebdavOperations/downloadFile.feature:170
apiWebdavOperations/downloadFile.feature:198
apiWebdavOperations/downloadFile.feature:199
apiWebdavOperations/refuseAccess.feature:21
Expand Down

0 comments on commit ed436a3

Please sign in to comment.