Github user artem-fedorov commented on a diff in the pull request:
https://github.com/apache/jmeter/pull/429#discussion_r232936723
--- Diff: bin/testfiles/TEST_HTTP_HttpClient4.xml ---
@@ -144,7 +144,7 @@
<httpSample s="true" lb="HR-FollowRedirect-18" rc="302" dt="text"/>
<httpSample s="true" lb="HR-FollowRedirect-19" rc="302" dt="text"/>
<httpSample s="true" lb="HR-FollowRedirect-20" rc="302" dt="text"/>
- <httpSample s="false" lb="HR-FollowRedirect-21" rc="Non HTTP response
code: java.io.IOException" dt="text"/>
--- End diff --
If you expect `HR-FollowRedirect-21` here we can fix it using this small
hack:
```
if (redirect >= MAX_REDIRECTS) {
lastRes = errorResult(new IOException("Exceeded maximum number
of redirects: " + MAX_REDIRECTS), new HTTPSampleResult(lastRes));
lastRes.setSampleLabel(totalRes.getSampleLabel()); // use
parent label
totalRes.addSubResult(lastRes);
}
```
---