Bug 48451 - Error in: SoapSampler.setPostHeaders(PostMethod post) in the else branch
Error in: SoapSampler.setPostHeaders(PostMethod post) in the else branch
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.3.4
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-12-28 08:12 UTC by Carol Gagne
Modified: 2009-12-29 19:16 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carol Gagne 2009-12-28 08:12:12 UTC
In class: org.apache.jmeter.protocol.http.sampler.SoapSampler
Method: setPostHeaders(PostMethod post)
Source file line: 143
....
} else {
            // otherwise we use "text/xml" as the default
            post.addParameter(HEADER_CONTENT_TYPE, DEFAULT_CONTENT_TYPE); 
        }...

I believe it should be something like

        } else {
            // otherwise we use "text/xml" as the default
            post.setRequestHeader(HEADER_CONTENT_TYPE, DEFAULT_CONTENT_TYPE);
        }

How to reproduce: Make sure no header manager is null (not set).
Capture the content of the call (with TCPMon for exemple). You will see the default content type does not appear in HTTP Header but in the content.

Regards
Comment 1 Sebb 2009-12-29 19:16:57 UTC
Thanks for the report and suggested fix.

This has been applied to SVN:


URL: http://svn.apache.org/viewvc?rev=894535&view=rev
Log:
Bug 48451 - Error in: SoapSampler.setPostHeaders(PostMethod post) in the else branch

and will be in nightly builds after r894535