jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Granum <>
Subject Corrupted HTTP body data when using test script recorder
Date Thu, 23 Oct 2014 17:46:02 GMT

I've been using the HTTP(S) Test Script Recorder in Jmeter to record some amazon S3 actions.
Specifically a file upload (PUT). Problem is, the captured HTTP sampler has a body data that
has some extra data inserted into it. 

My original sample file I uploaded is 25630 bytes. A small image file (jpg). The one that
gets uploaded with the captured HTTP sampler is 25723 bytes. 

I performed a hex compare between the original and the one from the sampler. (I downloaded
normally what the captured sampler uploaded). What I found immediately was a single byte inserted
very near the top of the file, which had the effect of offsetting everything else after that
by one byte and making it all look different. Since the difference in size is just under 100
bytes, I'm guessing this is happening in just under 100 other places in the file as well.

Look at the different Content-Length headers below... 

Here are the headers from when I upload the file manually: 
User-Agent: S3 Browser 4-6-1
x-amz-acl: private
x-amz-date: Thu, 23 Oct 2014 17:25:08 GMT
Content-Type: image/jpeg
Content-Length: 25630 

Here are the headers that Jmeter sends based on the captured sample: 
Connection: keep-alive
Content-Type: image/jpeg
x-amz-date: Thu, 23 Oct 2014 16:57:31 GMT
x-amz-acl: private
User-Agent: S3 Browser 4-6-1
Content-Length: 25723 

Does anyone know why this is and how I might modify my recorder so that it records the file
data exactly? 

Allen Granum 

1309 Carling Avenue 
Ottawa, Ontario, Canada K1Z 7L3 
(613) 722-3232 

View raw message