implement put data-present parameter in http servant
authorJoey Hess <joeyh@joeyh.name>
Tue, 29 Oct 2024 17:13:28 +0000 (13:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 29 Oct 2024 17:32:43 +0000 (13:32 -0400)
commita4e9057486da1ee652262778299b2a2033258cac
tree9efc4cff511dc7a20f8da5f9077a1fc39eaf4254
parent57e27adb55dd221303c7fd8f3cf3368f81d0a56b
implement put data-present parameter in http servant

Changed the protocol docs because servant parses "true" and "false" for
booleans in query parameters, not "1" and "0".

clientPut with datapresent=True is not used by git-annex, and I don't
anticipate it being used in git-annex, except for testing.

I've tested this by making clientPut be called with datapresent=True and
git-annex copy to a remote succeeds once the object file is first
manually copied to the remote. That would be a good test for the test
suite, but running the http client means exposing it to at least
localhost, and would fail if a real http client was already running on
that port.
P2P/Http.hs
P2P/Http/Client.hs
P2P/Http/Server.hs
Remote/Git.hs
doc/design/p2p_protocol_over_http.mdwn