Skip to content

Commit 0e656d5

Browse files
committed
fix
1 parent 91f1317 commit 0e656d5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

internal/turso/turso.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ func (t *Client) newRequest(method, urlPath string, body io.Reader, extraHeaders
9696

9797
func (t *Client) do(method, path string, body io.Reader, extraHeaders map[string]string) (*http.Response, error) {
9898
req, err := t.newRequest(method, path, body, extraHeaders)
99-
var reqDump string
100-
if flags.Debug() {
101-
reqDump = dumpRequest(req)
102-
}
10399
if err != nil {
104100
return nil, err
105101
}
@@ -109,6 +105,11 @@ func (t *Client) do(method, path string, body io.Reader, extraHeaders map[string
109105
return nil, err
110106
}
111107
req.ContentLength = int64(length)
108+
req.TransferEncoding = nil
109+
}
110+
var reqDump string
111+
if flags.Debug() {
112+
reqDump = dumpRequest(req)
112113
}
113114
resp, err := http.DefaultClient.Do(req)
114115
if err != nil {

0 commit comments

Comments
 (0)