Not Able to Capture Response when there is no Content-Type header
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Matias Fornara** ([Bug 64374](https://bz.apache.org/bugzilla//show_bug.cgi?id=64374&redirect=false)):
I am testing a Desktop Application that in certain responses does not send a Content-Type header (that is the app default behavior and cannot be modified).
This behavior makes that JMeter sets that attribute as an empty string in the sampler result so when it tries to write the response body it fails with the following message: "Non-TEXT response data, cannot record: ()".
Apart from that missing header, I can notice that server is responding with some message because the Content-Length is 101, but I cannot see the actual response because of this behavior.
The thing is, I understand this is JMeter's expected behavior in these cases but from a testing perspective, it would be useful that JMeter does not lose the response even when it is not a String, maybe it can be at least logged in the JMeter log or specified in the sampler result somehow.
Created attachment [errorExample.xml](https://apache.github.io/jmeter-bugzilla-attachments/74/64374/37196/errorExample.xml): xml from Simple Data Write
errorExample.xml
````xml
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded4
Host: qadval.inside.mtf.org:8080
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
Non-TEXT response data, cannot record: ()
JSESSIONID=F17874EBFF6589EFE72A1E4A4EDDA4DF; sid=020020poIWKcOPbTvptIBKfk0VZYFVDlds32X8s7cGdz1LNiY0; lang=en; isolang=en; mfglang=US
GET
http://url:8080/webapp/HTMLAdapter?BrowseAction=submit&apiSource=AppShell&detached=false&isolang=en&mfglang=US&enc=utf-8&sid=020020poIWKcOPbTvptIBKfk0VZYFVDlds32X8s7cGdz1LNiY0&xmlonly=true&userid=Perf_172&processsequenceid=NOT_FOUND&ProgramName=xxwowomt.p&sessionid=NOT_FOUND&cd_ref=NOT_FOUND&cd_lang=NOT_FOUND&cd_type=NOT_FOUND&cd_seq=NOT_FOUND&hiddenFocusField=cd_ref
Non-TEXT response data, cannot record: ()
Response Assertion
false
false
Response Assertion
false
false
Response Assertion
true
false
Test failed: text expected to contain /<global-variable name="global_ref">(.*?)<\/global-variable>/
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 101
Date: Fri, 17 Apr 2020 23:51:13 GMT
````
Severity: minor
OS: All
Contributor guide
Assessment
This issue has not been assessed yet.