jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Uploading File to WebDAV Server
Date Tue, 08 Feb 2011 19:18:52 GMT
Hi
are you giving a value for the parameter name (i think you shouldnt) with
the file?

see the doc from
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Request

* Parameter Handling: *
For the POST and PUT method, if there is no file to send, and the name(s) of
the parameter(s) are omitted, then the body is created by concatenating all
the value(s) of the parameters. This allows arbitrary bodies to be sent. The
values are encoded if the encoding flag is set (versions of JMeter after
2.3). See also the MIME Type above how you can control the content-type
request header that is sent.
For other methods, if the name of the parameter is missing, then the
parameter is ignored. This allows the use of optional parameters defined by
variables. (versions of JMeter after 2.3)

* Method Handling: *
The POST and PUT request methods work similarly, except that the PUT method
does not support multipart requests. The PUT method body must be provided as
one of the following:

   - define the body as a file
   - define the body as parameter value(s) with no name

If you define any parameters with a name in either the sampler or Http
defaults then nothing is sent. The GET and DELETE request methods work
similarly to each other.



On Tue, Feb 8, 2011 at 1:36 AM, TomZ <thomas.zirnsack@gfk.com> wrote:

>
> Hi,
>
> I have looked in Bugzilla and this forum/mailinglist, but couldn't find an
> answer. Sorry if this is a known
> issue. In that case, it would be nice, if you just point me to the
> respective resource.
>
> I am using jmeter v2.4. I am trying to upload a (simple text) file to my
> local webdav server.
>
> I have tested the HTTP request sampler _and_ HTTP Request HTTPClient
> sampler. Both create a file
> on my webdav server. But in both cases this file is empty (file size 0
> bytes).
>
> When I do the same with an unamed argument (without the file) it works in
> both cases.
>
> I inspected the sources for a while and discovered that around (have added
> some debug code) line 1100
> in HTTPSampler2.java (which is HTTP Request HTTPClient) the
> putBody.toString() returns an empty string.
> That looks like this is the reason for the zero byte sized file on my
> webdav
> server.
>
> Is this an known behavior? Can I do something to work around it?
>
> tia, tom
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Uploading-File-to-WebDAV-Server-tp3375611p3375611.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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message