I think I found the root of this problem. fossil is using ssh -T to connect to the server. This inhibits the creation of a pty and therefore sh is started with a pipe for This in turn makes libc use buffering. The commands are sent to this shell and the following POST request is obtained by sh too (due to the buffering). As a result, the remote fossil is waiting in read for data that will never arrive.

I think the best approach for this is to not do fancy things involving the shell, but switch to something like:

<verbatim>
ssh -e none -T <host> <fossil> ssh-sync <repo-path>
</verbatim>

ssh-sync differs from test-http by looping on stdin until it is closed. E.g. use ssh like the equivalent of keep-alive with HTTP.

Advantage: much less chance for a shell to mock things up. It can be easily changed to make fossil an ssh subsystem, which might be a nice option for deployment on central servers, where normal users shouldn't have shell access.