mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Make repository response support HTTP range request (#24592)
Replace #20480 Replace #18448 Close #16414
This commit is contained in:
		@@ -18,9 +18,9 @@ import (
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	// ErrHashMismatch occurs if the content has does not match OID
 | 
			
		||||
	ErrHashMismatch = errors.New("Content hash does not match OID")
 | 
			
		||||
	ErrHashMismatch = errors.New("content hash does not match OID")
 | 
			
		||||
	// ErrSizeMismatch occurs if the content size does not match
 | 
			
		||||
	ErrSizeMismatch = errors.New("Content size does not match")
 | 
			
		||||
	ErrSizeMismatch = errors.New("content size does not match")
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// ContentStore provides a simple file system based storage.
 | 
			
		||||
@@ -105,7 +105,7 @@ func (s *ContentStore) Verify(pointer Pointer) (bool, error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ReadMetaObject will read a git_model.LFSMetaObject and return a reader
 | 
			
		||||
func ReadMetaObject(pointer Pointer) (io.ReadCloser, error) {
 | 
			
		||||
func ReadMetaObject(pointer Pointer) (io.ReadSeekCloser, error) {
 | 
			
		||||
	contentStore := NewContentStore()
 | 
			
		||||
	return contentStore.Get(pointer)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user