File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ func (hf *Hoverfly) importRequestResponsePairViews(pairViews []v2.RequestMatcher
159159
160160 if len (pairView .Response .Headers ["Content-Length" ]) > 0 {
161161 contentLength , err := strconv .Atoi (pairView .Response .Headers ["Content-Length" ][0 ])
162- if err == nil && contentLength != len (pairView .Response .Body ) {
162+ response := models .NewResponseDetailsFromResponse (pairView .Response )
163+ if err == nil && contentLength != len (response .Body ) {
163164 importResult .AddContentLengthMismatchWarning (i )
164165 }
165166 }
Original file line number Diff line number Diff line change @@ -726,7 +726,7 @@ func TestImportImportRequestResponsePairs_ReturnsWarningsContentLengthAndTransfe
726726 Body : base64String ("hello_world" ),
727727 EncodedBody : true ,
728728 Headers : map [string ][]string {
729- "Content-Length" : []string {"16 " },
729+ "Content-Length" : []string {"11 " },
730730 "Transfer-Encoding" : []string {"chunked" },
731731 },
732732 },
You can’t perform that action at this time.
0 commit comments