Bug 28230 - HTTP request with no content-type raises NullPointerException
Summary: HTTP request with no content-type raises NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: unspecified
Hardware: All All
: P3 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-06 14:23 UTC by Richard Stedham
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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