avoid padding in servePut

This means that when the client sends a truncated data to indicate
invalidity, DATA is not passed the full expected data. That leaves the
P2P connection in a state where it cannot be reused. While so far, they
are not reused, they will be later when proxies are supported. So, have
to close the P2P connection in this situation.
This commit is contained in:
Joey Hess 2024-07-22 12:30:30 -04:00
parent efa0efdc44
commit a01426b713
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 42 additions and 31 deletions

View file

@ -186,7 +186,7 @@ testPut = do
(AssociatedFile (Just "foo"))
"foocontent"
30
(liftIO (print "validity check") >> return True)
(liftIO (print "validity check") >> return False)
liftIO $ print res
testRemove = do