Rework error handling in rrdp_handle_file.
Do not alter the repo state to REPO_FAILED on system errors in
rrdp_handle_file. Instead use a new flag file_failed to mark the
repository as failed. In rrdp_clear reset the flag after removing
all files. In rrdp_finish double check the file_failed state and
ensure that the repo enters REPO_FAILED state.
The current code only worked if rrdp_clear was called which is only
the case for delta handling. For snapshots triggering an error in
rrdp_handle_file the code would directly call rrdp_finish but
exit early there which stalls progress.
Reported by Xin Wang
OK tb@
Ensure consistent states in persistent HTTP connections
Check for mutually exclusive headers and trailing data in
HTTP responses that ought not to contain a message-body.
Reported by Xin Wang (王鑫)
OK claudio@