Skip to content

Commit 8f5fa41

Browse files
committed
adjust client response debug print
1 parent 3402a63 commit 8f5fa41

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func CallRet(ctx context.Context, ret interface{}, resp *http.Response) (err err
307307
switch {
308308
case
309309
resp.Header.Get("Content-Type") == "application/octet-stream",
310-
resp.ContentLength > 1024*1024:
310+
resp.ContentLength == 0 || resp.ContentLength > 1024*1024:
311311
hasBody = false
312312
}
313313

internal/clientv2/interceptor_debug.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (interceptor *debugInterceptor) printResponse(label string, resp *http.Resp
213213
switch {
214214
case
215215
resp.Header.Get("Content-Type") == "application/octet-stream",
216-
resp.ContentLength > 1024*1024:
216+
resp.ContentLength == 0 || resp.ContentLength > 1024*1024:
217217
hasBody = false
218218
}
219219

0 commit comments

Comments
 (0)