You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by holger achtziger <h....@googlemail.com> on 2008/07/09 07:11:48 UTC

HTTP sampler PUT request body

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?

Thanks for you help,
Holger

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 10/07/2008, holger achtziger <h....@googlemail.com> wrote:
> >>  >>  > 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?
>  >>
>  >>
>  >> not by intention.... Here is a screen shot:
>  >>  http://87.106.21.213/http_request.jpg
>  >>
>  >
>  > Perhaps the HTTP Request Defaults has a named parameter?
>
>
> yes, you are right, there was:
>  name: session
>  value: ${session}
>
>  removing this made the PUT work. Now i have my workaround:-)
>
>  Thank you for your support!
>

OK, thanks for confirming that it is now working.

>
>  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


Re: HTTP sampler PUT request body

Posted by holger achtziger <h....@googlemail.com>.
>>  >>  > 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?
>>
>>
>> not by intention.... Here is a screen shot:
>>  http://87.106.21.213/http_request.jpg
>>
>
> Perhaps the HTTP Request Defaults has a named parameter?

yes, you are right, there was:
name: session
value: ${session}

removing this made the PUT work. Now i have my workaround:-)

Thank you for your support!

Holger

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
> 2008/7/9 sebb <se...@gmail.com>:
>  > On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>  >> 2008/7/9 sebb <se...@gmail.com>:
>  >>  > On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>  >>  >> Hello Sebb,
>  >>  >>
>  >>  >>
>  >>  >>  2008/7/9 sebb <se...@gmail.com>:
>  >>  >>
>  >>  >> > On 09/07/2008, sebb <se...@gmail.com> wrote:
>  >>  >>  >> On 09/07/2008, holger achtziger <h....@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?
>
>
> not by intention.... Here is a screen shot:
>  http://87.106.21.213/http_request.jpg
>

Perhaps the HTTP Request Defaults has a named parameter?

>
>  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


Re: HTTP sampler PUT request body

Posted by holger achtziger <h....@googlemail.com>.
2008/7/9 sebb <se...@gmail.com>:
> On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>> 2008/7/9 sebb <se...@gmail.com>:
>>  > On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>>  >> Hello Sebb,
>>  >>
>>  >>
>>  >>  2008/7/9 sebb <se...@gmail.com>:
>>  >>
>>  >> > On 09/07/2008, sebb <se...@gmail.com> wrote:
>>  >>  >> On 09/07/2008, holger achtziger <h....@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?

not by intention.... Here is a screen shot:
http://87.106.21.213/http_request.jpg

Holger

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
> 2008/7/9 sebb <se...@gmail.com>:
>  > On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>  >> Hello Sebb,
>  >>
>  >>
>  >>  2008/7/9 sebb <se...@gmail.com>:
>  >>
>  >> > On 09/07/2008, sebb <se...@gmail.com> wrote:
>  >>  >> On 09/07/2008, holger achtziger <h....@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


Re: HTTP sampler PUT request body

Posted by holger achtziger <h....@googlemail.com>.
2008/7/9 sebb <se...@gmail.com>:
> On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
>> Hello Sebb,
>>
>>
>>  2008/7/9 sebb <se...@gmail.com>:
>>
>> > On 09/07/2008, sebb <se...@gmail.com> wrote:
>>  >> On 09/07/2008, holger achtziger <h....@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.

Holger

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 09/07/2008, holger achtziger <h....@googlemail.com> wrote:
> Hello Sebb,
>
>
>  2008/7/9 sebb <se...@gmail.com>:
>
> > On 09/07/2008, sebb <se...@gmail.com> wrote:
>  >> On 09/07/2008, holger achtziger <h....@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?

>  Thank you,
>
> 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


Re: HTTP sampler PUT request body

Posted by Tom Purcell <tp...@chariotsolutions.com>.
Hello

I'm having a problem running a JMeter test and this thread has helped. My
GETs were working and now my PUTs are working but I'm still having problems
with the POSTs. I've set them up the same as the PUTs but I'm getting the
exact same result Sebb got on POST:

POST https://localhost:8443/wile/ams/assets/asset/Server

POST data:
-----------------------------7d159c1302d0y0--



[no cookies]

Request Headers:
Connection: keep-alive
Content-Length: 47
userGUID: 26BC358E-9F90-FE7F-5199-01DB9FBB72FE
Content-Type: multipart/form-data;
boundary=---------------------------7d159c1302d0y0

The web app responds with:

<errors>
  <global>
    <error>Content is not allowed in prolog.</error>
  </global>
</errors>

My payload, for both PUT and POST, is XML. The XML sent in both cases is
almost identical the only difference is the PUT has one additional
identifier field. I'm running JDK 1.5.0_15 and JMeter 2.3.2 r665936.

Any thoughts?

Thanks
Tom



  

holger achtziger wrote:
> 
> Hello Sebb,
> 
> 2008/7/9 sebb <se...@gmail.com>:
> 
> 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?
> 
> Thank you,
> Holger
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/HTTP-sampler-PUT-request-body-tp18354618p19220316.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Re: HTTP sampler PUT request body

Posted by holger achtziger <h....@googlemail.com>.
Hello Sebb,

2008/7/9 sebb <se...@gmail.com>:
> On 09/07/2008, sebb <se...@gmail.com> wrote:
>> On 09/07/2008, holger achtziger <h....@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?

Thank you,
Holger

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 09/07/2008, sebb <se...@gmail.com> wrote:
> On 09/07/2008, holger achtziger <h....@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.

>
>  >  Thanks for you help,
>  >  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


Re: HTTP sampler PUT request body

Posted by holger achtziger <h....@googlemail.com>.
2008/7/9 sebb <se...@gmail.com>:
> On 09/07/2008, holger achtziger <h....@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:

Thank you for this information!

could you give me a hint where i have to look for in the sources? A patch
that solves the problem would also be nice;-)

Holger

>>  ------
>>  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.
>
>>  Thanks for you help,
>>  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
>
>

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


Re: HTTP sampler PUT request body

Posted by sebb <se...@gmail.com>.
On 09/07/2008, holger achtziger <h....@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.

>  Thanks for you help,
>  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