mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
Make --dump-bodies imply --dump-headers
This commit is contained in:
parent
c117eaf5a2
commit
f2eeb4301c
@ -144,7 +144,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
|
||||
// Force user agent
|
||||
req.Header.Set("User-Agent", UserAgent)
|
||||
// Log request
|
||||
if t.logHeader {
|
||||
if t.logHeader || t.logBody {
|
||||
buf, _ := httputil.DumpRequestOut(req, t.logBody)
|
||||
Debug(nil, "%s", separatorReq)
|
||||
Debug(nil, "%s", "HTTP REQUEST")
|
||||
@ -154,7 +154,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
|
||||
// Do round trip
|
||||
resp, err = t.Transport.RoundTrip(req)
|
||||
// Log response
|
||||
if t.logHeader {
|
||||
if t.logHeader || t.logBody {
|
||||
Debug(nil, "%s", separatorResp)
|
||||
Debug(nil, "%s", "HTTP RESPONSE")
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user