Bug 28230 - HTTP request with no content-type raises NullPointerException
HTTP request with no content-type raises NullPointerException
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
unspecified
All All
: P3 minor (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
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...]