Bug 39827 - Return proper content length in SOAP/XML-RPC Sampler
Summary: Return proper content length in SOAP/XML-RPC Sampler
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.2
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-17 00:26 UTC by sumit shah
Modified: 2007-02-06 15:12 UTC (History)
0 users



Attachments
patch to enable calculation of content length in soap sampler (988 bytes, patch)
2006-06-17 00:27 UTC, sumit shah
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sumit shah 2006-06-17 00:26:40 UTC
Here is a patch against SoapSampler.java to properly calculate the content
length on the post submission.
Comment 1 sumit shah 2006-06-17 00:27:46 UTC
Created attachment 18480 [details]
patch to enable calculation of content length in soap sampler
Comment 2 Sebb 2007-02-06 15:12:41 UTC
Thanks for the patch. Sorry it has taken so long to get round to it.

There is a slight problem with using File().length() - on some platforms it 
may return a different value from counting the data bytes in the file. 

E.g. on OpenVMS it returns a larger number for text files.
[This is because VMS normally uses variable length records for these, and the 
record size prefix is included in the file size]

I've updated the code to use the Content-Length header if present:
-1 = use chunked
0 or missing = use File.length
else = use the header value as the length

This should cover all possibilities...

It will be in the next nightly build at:

http://people.apache.org/builds/jakarta-jmeter/nightly/

Note: the Content-Length should not be added by the user, so I've suppressed 
it in the underlying HttpClient sampler.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:37 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1750