"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
Improve output of `--dump-headers`
Nick Craig-Woodb4d7741611be
diff --git a/fs/loghttp.go b/fs/loghttp.goindex d67546b87..4c6f868e4 100644--- a/fs/loghttp.go+++ b/fs/loghttp.go@@ -8,7 +8,10 @@ import ("net/http/httputil")-const separator = "------------------------------------------------------------"+const (+ separatorReq = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+ separatorResp = "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+)// LoggedTransport is an http transport which logs the traffictype LoggedTransport struct {@@ -39,16 +42,16 @@ func (t *LoggedTransport) CancelRequest(req *http.Request) {// RoundTrip implements the RoundTripper interface.func (t *LoggedTransport) RoundTrip(req *http.Request) (resp *http.Response, err error) {- buf, _ := httputil.DumpRequest(req, t.logBody)- log.Println(separator)+ buf, _ := httputil.DumpRequestOut(req, t.logBody)+ log.Println(separatorReq)log.Println("HTTP REQUEST")log.Println(string(buf))- log.Println(separator)+ log.Println(separatorReq)resp, err = t.wrapped.RoundTrip(req)buf, _ = httputil.DumpResponse(resp, t.logBody)- log.Println(separator)+ log.Println(separatorResp)log.Println("HTTP RESPONSE")log.Println(string(buf))- log.Println(separator)+ log.Println(separatorResp)return resp, err}