jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: HTTP sampler PUT request body
Date Wed, 09 Jul 2008 12:18:29 GMT
On 09/07/2008, holger achtziger <h.achtziger@googlemail.com> wrote:
> 2008/7/9 sebb <sebbaz@gmail.com>:
>  > On 09/07/2008, holger achtziger <h.achtziger@googlemail.com> wrote:
>  >> Hello Sebb,
>  >>
>  >>
>  >>  2008/7/9 sebb <sebbaz@gmail.com>:
>  >>
>  >> > On 09/07/2008, sebb <sebbaz@gmail.com> wrote:
>  >>  >> On 09/07/2008, holger achtziger <h.achtziger@googlemail.com>
wrote:
>  >>  >>  > Hello there,
>  >>  >>  >
>  >>  >>  >  i'm new with jmeter and currently trying to generate a load
test for
>  >>  >>  >  an AJAX application.
>  >>  >>  >  The application is talking JSON. All reading tasks, i could
>  >>  >>  >  succesfully create. The writing
>  >>  >>  >  ones that use PUT won't work. The reqest body always is empty:
>  >>  >>  >
>  >>  >>  >  ------
>  >>  >>  >  PUT http://localhost/ajax/calendar?session=a9a7bdb82a1548be7765dbdbdc4e28cc&action=new
>  >>  >>  >
>  >>  >>  >  POST data:
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >  Cookie Data:
>  >>  >>  >  [...]
>  >>  >>  >  -----
>  >>  >>  >
>  >>  >>  >  When i change from PUT to POST in the http sampler, the request
body
>  >>  >>  >  is sent but the
>  >>  >>  >  backend generates an error because of not supporting POST
for this task:-(
>  >>  >>  >
>  >>  >>  >  I tried with jmeter version 2.3.2 and  r674210 without luck.
>  >>  >>  >
>  >>  >>  >  Is this some know issue and a workaround possible?
>  >>  >>  >
>  >>  >>
>  >>  >>
>  >>  >> Looks like this is a bug in JMeter.
>  >>  >>
>  >>  >>  Sorry, but I doubt that there is a workround - you'll have to wait
for
>  >>  >>  the next release.
>  >>  >>
>  >>  >
>  >>  > Wrote too soon.
>  >>  >
>  >>  > PUT can send data.
>  >>  >
>  >>  > However, you have to send the data either as a parameter value (no
>  >>  > name) or as a file.
>  >>  >
>  >>  > If you define a parameter name and value it is ignored.
>  >>
>  >>
>  >> i just tried again (same HTTP request, once POST then PUT) from tcpdump :
>  >>
>  >>  POST:
>  >>  POST /ajax/calendar?session=77470754bebddcceaeb044ca98524768&action=new
HTTP/1.1
>  >>  Connection: keep-alive
>  >>  Content-Type: multipart/form-data;
>  >>  boundary=---------------------------7d159c1302d0y0
>  >>  Accept-Language: en-us
>  >>  Host: ox-login.de
>  >>  Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>  >>  Keep-Alive: 300
>  >>  User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.14)
>  >>  Gecko/20080404 Firefox/2.0.0.14
>  >>  Referer: http://ox-login.de/newAppointment.html
>  >>  Accept-Encoding: gzip,deflate
>  >>  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>  >>  Cookie: session-77470754bebddcceaeb044ca98524768=74fa587fe4431f92e445a930cfb05953;
>  >>  JSESSIONID=b5d9a19adbb26fa6bb37e1d05100b4988cfd5462
>  >>  Content-Length: 434
>  >>
>  >>  -----------------------------7d159c1302d0y0
>  >>  Content-Disposition: form-data; name="json-0"
>  >>  Content-Type: text/plain; charset=ISO-8859-1
>  >>  Content-Transfer-Encoding: 8bit
>  >>
>  >>  [{}]
>  >>  -----------------------------7d159c1302d0y0
>  >>  Content-Disposition: form-data; name="session"
>  >>  Content-Type: text/plain; charset=ISO-8859-1
>  >>  Content-Transfer-Encoding: 8bit
>  >>
>  >>  77470754bebddcceaeb044ca98524768
>  >>  -----------------------------7d159c1302d0y0--
>  >>
>  >>  PUT:
>  >>  PUT /ajax/calendar?session=6546fac33f0301345ed2747a2df378d5&action=new
HTTP/1.1
>  >>  Connection: keep-alive
>  >>  Content-Type: text/javascript; charset=UTF-8
>  >>  Accept-Language: en-us
>  >>  Host: ox-login.de
>  >>  Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>  >>  Keep-Alive: 300
>  >>  User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.14)
>  >>  Gecko/20080404 Firefox/2.0.0.14
>  >>  Referer: http://ox-login.de/newAppointment.html
>  >>  Accept-Encoding: gzip,deflate
>  >>  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>  >>  Cookie: session-6546fac33f0301345ed2747a2df378d5=40aa25065cbffd955193b6ab1c01473f;
>  >>  JSESSIONID=bb827b20f0cfc7a856e84512f795b0def3224a5c
>  >>
>  >>  do i something wrong here?
>  >>
>  >
>  > What have you put in the parameter section of the HTTP request?
>
>
> name: json-0
>  value: [{}]
>
>  i also tried with an empty name.
>

Works for me with a single parameter with no name.

Have you used any other parameters?

>
>  Holger
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message