git-lfs gitlab interoperability fix
git-lfs: Fix interoperability with gitlab's implementation of the git-lfs protocol, which requests Content-Encoding chunked. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
dee462f536
commit
f3326b8b5a
8 changed files with 105 additions and 11 deletions
|
@ -37,6 +37,12 @@ httpBodyStorer src m = do
|
|||
let streamer sink = withMeteredFile src m $ \b -> byteStringPopper b sink
|
||||
return $ RequestBodyStream (fromInteger size) streamer
|
||||
|
||||
-- Like httpBodyStorer, but generates a chunked request body.
|
||||
httpBodyStorerChunked :: FilePath -> MeterUpdate -> RequestBody
|
||||
httpBodyStorerChunked src m =
|
||||
let streamer sink = withMeteredFile src m $ \b -> byteStringPopper b sink
|
||||
in RequestBodyStreamChunked streamer
|
||||
|
||||
byteStringPopper :: L.ByteString -> NeedsPopper () -> IO ()
|
||||
byteStringPopper b sink = do
|
||||
mvar <- newMVar $ L.toChunks b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue