Bug 28230

Summary: HTTP request with no content-type raises NullPointerException
Product: JMeter - Now in Github Reporter: Richard Stedham <richard.stedham>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Richard Stedham 2004-04-06 14:23:53 UTC
Found in JMeter 2.0
Using the HTTP Sampler with the 'Retrieve all embedded resources from HTML 
Files' ticked. When a resource that does not have a content type defined on the 
web sever is accessed a null pointer exception occurs on line 563 of 
HTTPSampler.
Tracked this down to res.getDataType() being called, which uses a private 
string dataType in SampleResult that is not initialised. I have fixed this on 
my build by setting it to "" on initialisation and this works.
Comment 1 Sebb 2004-04-13 18:37:20 UTC
Thanks for reporting this.

Fixed by making getDataType the parameter for the equals() method, rather than 
the object.

[This allows dataType to be null - if this proves necessary...]
Comment 2 The ASF infrastructure team 2022-09-24 20:37:32 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1341