You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Henrik Ridder <he...@partitur.se> on 2001/10/09 09:16:09 UTC

re: "File Upload"


Kevin,

Sorry for the lack of information.
I'm running cvs-jmeter update 8 oct on freebsd 4.4 and jdk1.2.2


The thing is that when I make some trace lines in the code it all seems
good. But the file do not appere on the web-server.

I'm having it on POST, and tried with the "Send file" checkbox
checked
and the "send arguments" checkbox checked and vice versa.

But it always sends the argument and the file no matter what you do in the
with thoose checkboxes in the Web test.

Maybe I'm doning it all wrong. But I haven't found any info on multipart
upload on the web.


I will have to make some investigation on my on with tcpdump.

I only pop the question to see if there was a common problem



Thanks for a great program

Henrik


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


Re: "File Upload"

Posted by Henrik Ridder <he...@partitur.se>.
Kevin,


I have tried that and I'm getting the same result as you

Start with the boundary and ends with the boundary

The dump shows the same thing and also the contents of the file being sent.

I must check the server side more before I can get back to you .


Thanks
/Henrik

Kevin Hammond wrote:

> Henrik,
>
> I just tested File Upload with MultipartRequest with a simple JSP.  My JSP
> received the request, but the length of the file was 0.
>
> I added some debug statements to MultipartFormSampler.java and saw that the
> file contents are being sent.  But, for some reason, the O'reilly code is
> not able to correctly extract the file contents.  I will look at it again
> later today.
>
> Here is a sample of the multipart message that I sent:
>
> [kevin's file - BEGIN]
>
> -----------------------------7d159c1302d0y0
> Content-Disposition: form-data; name="myfile";
> filename="C:\\jakarta-jmeter-nightly\\test9\\kevintest\\bin\\jmeter-server.b
> at"
> Content-Type: text/plain
>
> @echo off
>
> set PROP=jmeter.properties
>
> set LOG4JCONFIG=log4j.configuration=log4j.conf
>
> set HOST=
>
> set PORT=
>
> IF "%1" EQU "-f" set PROP=%2
>
> IF "%1" EQU "-h" set HOST=-Dhttp.proxyHost=%2 -Dhttps.proxyHost=%2
>
> IF "%1" EQU "-p" set PORT=-Dhttp.proxyPort=%2 -Dhttps.proxyPort=%2
>
> IF "%3" EQU "-f" set PROP=%4
>
> IF "%3" EQU "-h" set HOST=-Dhttp.proxyHost=%4 -Dhttps.proxyHost=%4
>
> IF "%3" EQU "-p" set PORT=-Dhttp.proxyPort=%4 -Dhttps.proxyPort=%4
>
> IF "%5" EQU "-f" set PROP=%6
>
> IF "%5" EQU "-h" set HOST=-Dhttp.proxyHost=%6 -Dhttps.proxyHost=%6
>
> IF "%5" EQU "-p" set PORT=-Dhttp.proxyPort=%6 -Dhttps.proxyPort=%6
>
> set LOCALCLASSPATH=%CLASSPATH%
>
> for %%i in ("..\lib\*.jar") do CALL ..\lcp %%i
>
> for %%i in ("..\ext\*.jar") do CALL ..\lcp %%i
>
> java -cp %LOCALCLASSPATH%;ApacheJMeter.jar -D%LOG4JCONFIG% %HOST% %PORT%
> org.apache.jmeter.engine.RemoteJMeterEngineImpl %PROP%
> -----------------------------7d159c1302d0y0--
>
> [kevin's file - END]
>
> See MultipartFormSampler.sendPostData().  You can temporarily set the output
> to a file instead of the socket.
>
> Thanks,
> Kevin Hammond
>
> ----- Original Message -----
> From: "Henrik Ridder" <he...@partitur.se>
> To: <jm...@jakarta.apache.org>
> Sent: Tuesday, October 09, 2001 8:40 AM
> Subject: Re: "File Upload"
>
> > Hi!
> >
> > I'm using a MultipartRequest.java that depends on
> > com.oreilly.servlet.MultipartRequest from oreilly's.
> > It has some feature's that the orignal MultipartRequest dosen't have. But
> not
> > much.
> >
> >
> > Henrik
> >
> > Mike Stover wrote:
> >
> > > What are you using on the server side to "catch" the file?
> > >
> > > -Mike
> > >
> > > On Tuesday 09 October 2001 07:16, Henrik Ridder wrote:
> > > > Kevin,
> > > >
> > > > Sorry for the lack of information.
> > > > I'm running cvs-jmeter update 8 oct on freebsd 4.4 and jdk1.2.2
> > > >
> > > >
> > > > The thing is that when I make some trace lines in the code it all
> seems
> > > > good. But the file do not appere on the web-server.
> > > >
> > > > I'm having it on POST, and tried with the "Send file" checkbox
> > > > checked
> > > > and the "send arguments" checkbox checked and vice versa.
> > > >
> > > > But it always sends the argument and the file no matter what you do in
> the
> > > > with thoose checkboxes in the Web test.
> > > >
> > > > Maybe I'm doning it all wrong. But I haven't found any info on
> multipart
> > > > upload on the web.
> > > >
> > > >
> > > > I will have to make some investigation on my on with tcpdump.
> > > >
> > > > I only pop the question to see if there was a common problem
> > > >
> > > >
> > > >
> > > > Thanks for a great program
> > > >
> > > > Henrik
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> > > --
> > > Mike Stover
> > > mstover1@apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> > --
> > -----------------------
> > tel.   +46 8 5662 80 09
> > fax.   +46 8 5662 80 20
> > mobil. +46 708 88 36 67
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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

--
-----------------------
tel.   +46 8 5662 80 09
fax.   +46 8 5662 80 20
mobil. +46 708 88 36 67




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


Re: "File Upload"

Posted by Kevin Hammond <kh...@home.com>.
Henrik,

I just tested File Upload with MultipartRequest with a simple JSP.  My JSP
received the request, but the length of the file was 0.

I added some debug statements to MultipartFormSampler.java and saw that the
file contents are being sent.  But, for some reason, the O'reilly code is
not able to correctly extract the file contents.  I will look at it again
later today.

Here is a sample of the multipart message that I sent:

[kevin's file - BEGIN]

-----------------------------7d159c1302d0y0
Content-Disposition: form-data; name="myfile";
filename="C:\\jakarta-jmeter-nightly\\test9\\kevintest\\bin\\jmeter-server.b
at"
Content-Type: text/plain

@echo off

set PROP=jmeter.properties

set LOG4JCONFIG=log4j.configuration=log4j.conf

set HOST=

set PORT=

IF "%1" EQU "-f" set PROP=%2

IF "%1" EQU "-h" set HOST=-Dhttp.proxyHost=%2 -Dhttps.proxyHost=%2

IF "%1" EQU "-p" set PORT=-Dhttp.proxyPort=%2 -Dhttps.proxyPort=%2

IF "%3" EQU "-f" set PROP=%4

IF "%3" EQU "-h" set HOST=-Dhttp.proxyHost=%4 -Dhttps.proxyHost=%4

IF "%3" EQU "-p" set PORT=-Dhttp.proxyPort=%4 -Dhttps.proxyPort=%4

IF "%5" EQU "-f" set PROP=%6

IF "%5" EQU "-h" set HOST=-Dhttp.proxyHost=%6 -Dhttps.proxyHost=%6

IF "%5" EQU "-p" set PORT=-Dhttp.proxyPort=%6 -Dhttps.proxyPort=%6



set LOCALCLASSPATH=%CLASSPATH%



for %%i in ("..\lib\*.jar") do CALL ..\lcp %%i

for %%i in ("..\ext\*.jar") do CALL ..\lcp %%i

java -cp %LOCALCLASSPATH%;ApacheJMeter.jar -D%LOG4JCONFIG% %HOST% %PORT%
org.apache.jmeter.engine.RemoteJMeterEngineImpl %PROP%
-----------------------------7d159c1302d0y0--

[kevin's file - END]

See MultipartFormSampler.sendPostData().  You can temporarily set the output
to a file instead of the socket.

Thanks,
Kevin Hammond

----- Original Message -----
From: "Henrik Ridder" <he...@partitur.se>
To: <jm...@jakarta.apache.org>
Sent: Tuesday, October 09, 2001 8:40 AM
Subject: Re: "File Upload"


> Hi!
>
> I'm using a MultipartRequest.java that depends on
> com.oreilly.servlet.MultipartRequest from oreilly's.
> It has some feature's that the orignal MultipartRequest dosen't have. But
not
> much.
>
>
> Henrik
>
> Mike Stover wrote:
>
> > What are you using on the server side to "catch" the file?
> >
> > -Mike
> >
> > On Tuesday 09 October 2001 07:16, Henrik Ridder wrote:
> > > Kevin,
> > >
> > > Sorry for the lack of information.
> > > I'm running cvs-jmeter update 8 oct on freebsd 4.4 and jdk1.2.2
> > >
> > >
> > > The thing is that when I make some trace lines in the code it all
seems
> > > good. But the file do not appere on the web-server.
> > >
> > > I'm having it on POST, and tried with the "Send file" checkbox
> > > checked
> > > and the "send arguments" checkbox checked and vice versa.
> > >
> > > But it always sends the argument and the file no matter what you do in
the
> > > with thoose checkboxes in the Web test.
> > >
> > > Maybe I'm doning it all wrong. But I haven't found any info on
multipart
> > > upload on the web.
> > >
> > >
> > > I will have to make some investigation on my on with tcpdump.
> > >
> > > I only pop the question to see if there was a common problem
> > >
> > >
> > >
> > > Thanks for a great program
> > >
> > > Henrik
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> > --
> > Mike Stover
> > mstover1@apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
> --
> -----------------------
> tel.   +46 8 5662 80 09
> fax.   +46 8 5662 80 20
> mobil. +46 708 88 36 67
>
>
>
>
> ---------------------------------------------------------------------
> 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: "File Upload"

Posted by Henrik Ridder <he...@partitur.se>.
Hi!

I'm using a MultipartRequest.java that depends on
com.oreilly.servlet.MultipartRequest from oreilly's.
It has some feature's that the orignal MultipartRequest dosen't have. But not
much.


Henrik

Mike Stover wrote:

> What are you using on the server side to "catch" the file?
>
> -Mike
>
> On Tuesday 09 October 2001 07:16, Henrik Ridder wrote:
> > Kevin,
> >
> > Sorry for the lack of information.
> > I'm running cvs-jmeter update 8 oct on freebsd 4.4 and jdk1.2.2
> >
> >
> > The thing is that when I make some trace lines in the code it all seems
> > good. But the file do not appere on the web-server.
> >
> > I'm having it on POST, and tried with the "Send file" checkbox
> > checked
> > and the "send arguments" checkbox checked and vice versa.
> >
> > But it always sends the argument and the file no matter what you do in the
> > with thoose checkboxes in the Web test.
> >
> > Maybe I'm doning it all wrong. But I haven't found any info on multipart
> > upload on the web.
> >
> >
> > I will have to make some investigation on my on with tcpdump.
> >
> > I only pop the question to see if there was a common problem
> >
> >
> >
> > Thanks for a great program
> >
> > Henrik
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
> --
> Mike Stover
> mstover1@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

--
-----------------------
tel.   +46 8 5662 80 09
fax.   +46 8 5662 80 20
mobil. +46 708 88 36 67




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


Re: "File Upload"

Posted by Mike Stover <ms...@apache.org>.
What are you using on the server side to "catch" the file?

-Mike

On Tuesday 09 October 2001 07:16, Henrik Ridder wrote:
> Kevin,
>
> Sorry for the lack of information.
> I'm running cvs-jmeter update 8 oct on freebsd 4.4 and jdk1.2.2
>
>
> The thing is that when I make some trace lines in the code it all seems
> good. But the file do not appere on the web-server.
>
> I'm having it on POST, and tried with the "Send file" checkbox
> checked
> and the "send arguments" checkbox checked and vice versa.
>
> But it always sends the argument and the file no matter what you do in the
> with thoose checkboxes in the Web test.
>
> Maybe I'm doning it all wrong. But I haven't found any info on multipart
> upload on the web.
>
>
> I will have to make some investigation on my on with tcpdump.
>
> I only pop the question to see if there was a common problem
>
>
>
> Thanks for a great program
>
> Henrik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

-- 
Mike Stover
mstover1@apache.org

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