From 78ba3e8adce0df1def7276a374d695c7ab5827f3 Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:02:57 -0600 Subject: [PATCH] revert content length as its already set by module --- src/Cli/Cli.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Cli/Cli.hs b/src/Cli/Cli.hs index bb9e397..dd3ea42 100644 --- a/src/Cli/Cli.hs +++ b/src/Cli/Cli.hs @@ -578,15 +578,14 @@ upload (Upload name mpkg shouldIndex) = do eosUpload :: EosUpload -> IO () eosUpload (EosUpload name img version) = do PublishCfgRepo{..} <- findNameInCfg name - size <- fromInteger <$> getFileSize img + size <- getFileSize img noBody <- parseRequest ("POST " <> show publishCfgRepoLocation <> "/admin/v0/eos-upload") <&> setRequestHeaders [("accept", "text/plain")] <&> setRequestHeaders [("Content-Encoding", "gzip")] - <&> setRequestHeaders [("Content-Length", show size)] <&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass) hash <- hashFile @_ @SHA256 img - bar <- newProgressBar defStyle 30 (Progress 0 size ()) + bar <- newProgressBar defStyle 30 (Progress 0 (fromIntegral size) ()) body <- observedStreamFile (updateProgress bar . const . sfs2prog) img let withBody = setRequestBody body noBody let withQParams =