diff --git a/cabal.project b/cabal.project index 1b036aa86..168ebc045 100644 --- a/cabal.project +++ b/cabal.project @@ -15,7 +15,7 @@ source-repository-package source-repository-package type: git location: https://github.com/kazu-yamamoto/http2.git - tag: aa56ded3494dd4f0efb0bbcb5378879ce785a647 + tag: c2567c30d471671302b01961d0fe1c21e1477c87 source-repository-package type: git diff --git a/src/Simplex/FileTransfer/Transport.hs b/src/Simplex/FileTransfer/Transport.hs index 5103d94cf..18283367e 100644 --- a/src/Simplex/FileTransfer/Transport.hs +++ b/src/Simplex/FileTransfer/Transport.hs @@ -57,15 +57,12 @@ sendEncFile :: Handle -> (Builder -> IO ()) -> LC.SbState -> Word32 -> IO () sendEncFile h send = go where go sbState 0 = do - -- TODO padding somehow also solves timing issue in HTTP2 (?) - let authTag = BA.convert (LC.sbAuth sbState) <> B.replicate (fileBlockSize - C.authTagSize) '#' + let authTag = BA.convert (LC.sbAuth sbState) send $ byteString authTag go sbState sz = getFileChunk h sz >>= \ch -> do let (encCh, sbState') = LC.sbEncryptChunk sbState ch send (byteString encCh) `E.catch` \(e :: E.SomeException) -> print e >> E.throwIO e - -- TODO remove delay when HTTP2 issue is fixed - threadDelay 500 go sbState' $ sz - fromIntegral (B.length ch) getFileChunk :: Handle -> Word32 -> IO ByteString