File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -583,8 +583,17 @@ The first chunk of the Message Body (for display purposes).
583
583
bodysummary (body) = isbytes (body) ? view (bytes (body), 1 : min (nbytes (body), BODY_SHOW_MAX[])) : " [Message Body was streamed]"
584
584
bodysummary (body:: Union{AbstractDict, NamedTuple} ) = URIs. escapeuri (body)
585
585
function bodysummary (body:: Form )
586
- if length (body. data) == 1 && isa (body. data[1 ], IOBuffer)
587
- return body. data[1 ]. data[1 : body. data[1 ]. ptr- 1 ]
586
+ if length (body. data) == 1
587
+ data = body. data[1 ]
588
+ if data isa Base. GenericIOBuffer && data. seekable
589
+ oldmark = data. mark
590
+ m = mark (data)
591
+ seekstart (data)
592
+ content = read (data, m)
593
+ reset (data)
594
+ data. mark = oldmark
595
+ return content
596
+ end
588
597
end
589
598
return " [Message Body was streamed]"
590
599
end
You can’t perform that action at this time.
0 commit comments