You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by git <gi...@cubicalland.com> on 2007/01/26 10:41:40 UTC

Re: Why did the recorded HTTP Request sampler concatenate POST parameters?

Gregor,

At first glance it looks like there is some problem with your post
parameters, which is odd as they are coming out of firefox.

POST and GET normally have the same encoding, the only difference being
the in GET the encoded string goes after on the URL and for POST is
comes after the blank line that indicates the end of the headers.  Thus,
for both POST and GET, the end of a parameter is signalled by either the
end of the encoded string or &.  There are no & between your parameters,
so JMeter is correctly (IMHO) assuming that the entire encoded string to
the left of the first = is one value.

There is not 100% solid specification for CGI encoding - which is kind
of odd as half the world runs on it now - so one could reasonably argue
that line separators can count as parameter separators - but it is not
100% agreed - as you have found.

Is this POST coming from an XMLHTTP request.  If this the case, the
javascript that generated the request should put & not newline between
paramters.

Cheers

AJ

On Thu, 2007-01-25 at 16:28 -0500, Okorn, Gregor (SAIC) wrote:

> Hi All,
> I just started used JMeter, and was happy to discover its ability to
> record navigation sequences while a user browses a website, but was
> confused when I learned that after it had finished, and I inspected the
> generated HTTP Request for a POST action, there was only one parameter
> entry.  In actuality there should have been five POST parameters, but
> what JMeter did was concatenate all parameter name/value pairs, starting
> with the second parameter, to the Value of the first parameter.  Here's
> the POST request I captured using Ethereal:
> 
> POST /JPERMS/dwr/exec/permissionModel.toggleCell.dwr HTTP/1.1 
> Host: 10.20.20.240:7001 
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9)
> Gecko/20061206 Firefox/1.5.0.9 
> Accept:
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
> n;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 
> Accept-Encoding: gzip,deflate 
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
> Keep-Alive: 300 
> Connection: keep-alive 
> Content-Type: text/plain 
> Content-Length: 138 
> Cookie:
> JSESSIONID=ljKkF5ZhLdGjsqF913nkK5Lb9gDmrsYWvRLC93MJ5grtVjpVfjzW!-3915008
> 91 
> Pragma: no-cache Cache-Control: no-cache  
> 
> callCount=1
> c0-scriptName=permissionModel
> c0-methodName=toggleCell
> c0-id=190_1169758559821
> c0-param0=number:3
> c0-param1=number:1
> xml=true 
> 
> 
> And when inspecting the corresponding HTTP Request sampler generated by
> JMeter, there was one POST parameter with the 
> 
>  Name: "callCount" with a 
>  Value:
> "1c0-scriptName=permissionModelc0-methodName=toggleCellc0-id=190_1169758
> 559821c0-param0=number:3c0-param1=number:1xml=true"
> 
> Does anyone know what the problem could be?
> Thanks so much?
> Gregor
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

www.cubicalland.com
www.nerds-central.blogspot.com