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


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 
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...]