On Fri, May 16, 2008 at 8:01 PM, sebb <[EMAIL PROTECTED]> wrote: > On 16/05/2008, Santosh Reddy <[EMAIL PROTECTED]> wrote: > > On Fri, May 16, 2008 at 6:23 PM, sebb <[EMAIL PROTECTED]> wrote: > > > > > On 16/05/2008, Santosh Reddy <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On Fri, May 16, 2008 at 6:08 AM, sebb <[EMAIL PROTECTED]> wrote: > > > > > > > > > > On 14/05/2008, sebb <[EMAIL PROTECTED]> wrote: > > > > > > On 14/05/2008, sebb <[EMAIL PROTECTED]> wrote: > > > > > > > On 13/05/2008, Santosh Reddy <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > Thanks for the information. > > > > > > > > > > > > > > > > This is what i am looking for, > > > > > > > > > > > > > > > > The Content-Type in POST is > > > > > > > > multipart/form-data with some bounday > > > > > > > > > > > > > > > > First Body > > > > > > > > Content-Type of First body is Content-Type: > > > > > > > > application/x-www-form-urlencoded > > > > > > > > and the body for this is the Name Value pairs mentioned > in the > > > > HTTP Request > > > > > > > > > > > > > > > > Second Body > > > > > > > > Sends the file which is mentioned > > > > > > > > > > > > > > > > > > I've done some testing, and it appears that browsers do not behave > like > > > > that. > > > > > > > > > > > > > > I am not sure how the browsers would send this kind of data i.e. > > > name-value > > > > pairs and the file > > > > can u please let me what is the standard way for sending this kind > of > > > data > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > But currently the Name Value pairs are being sent in > seperated > > > > Bodies as > > > > > > > > text/plain > > > > > > > > > > If a file is included in a form, you need to use > > > > > enctype="multipart/form-data" in which case the parameters are > sent as > > > > > you just described. > > > > > > > > > > > > > > > > > > Yes, i would require Content-Type header in POST request as > > > > "multipart/form-data" and jmeter is doing so > > > > but the first body is not sent in the format i mentioned. It is > being > > > split > > > > into as many multipart bodies as the number of name-value pairs > > > > > > But as I wrote before, normal browsers don't do it that way, and nor > > > does JMeter. > > > > > > If you want to test out what a browser does, here is a sample form you > can > > > test: > > > > > > <html> > > > <body> > > > <form action="http://localhost:8080/dummy" > > > enctype="multipart/form-data" > > > method="post"> > > > <input name="field1" type="text"/> > > > <input name="field2" type="text"/> > > > <input name="file1" type="file"> > > > <input name="file2" type="file"> > > > <input type="submit" /> > > > </form> > > > </body> > > > </html> > > > > > > Save this is form.html. > > > > > > Start the JMeter Mirror server on port 8080. > > > > > > Then use a browser to populate and submit the form. > > > The mirror server will return what is sent to the server and it will > > > appear in the browser window. > > > > > > > I have tested with a couple of browsers and the behavior is same as > Jmeter > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Is there any way in the current release to do this. > > > > > > > > > > > > > > > > > Is there a sample form which you can provide that behaves as you > wish > > > > > JMeter to behave? > > > > > > > > > > > > > > > > > > > > > > > > I do not have a sample form, but this is the way the server expects > the > > > data > > > > > > Does the server have to handle requests from browsers? > > > If so, it should be able to handle what JMeter is sending it, as that > > > is the standard way browsers send it. > > > > > > > Yes it does handle requests from browsers, but it would have some special > > code to send the data in this way. > > Does your server handle these types of requests from browsers, i.e. > with paramaters and files? > our server is not accepting data in the way jmeter or normal browser sends.
> > > Can we do this with jmeter > > As I have written before JMeter does not support this currently. > > However, see previous posting as to how you can create a file > containing the entire body of the POST. > > If you can point to some published documentation of the format that > the server is expecting, then it might be possible to add support to a > future version of JMeter. > > At present the format seems to be restricted to your particular > application. > Below the format the server expects though i am not sure it is any standard way of doing it. I have achieved it fooling either jmeter or the server by sending a parameter with name as "params" and value as the entire string "field1=abcd&field2=1234&field3=xyz" -----------------------------7d159c1302d0y0 Content-Disposition: form-data; name="params" Content-Type: application/x-www-form-urlencoded; charset=US-ASCII Content-Transfer-Encoding: 8bit field1=abcd&field2=1234&field3=xyz -----------------------------7d159c1302d0y0 Content-Disposition: form-data; name="abcd.xml"; filename="abcd.xml" Content-Type: text/xml Content-Transfer-Encoding: binary <actual file content, not shown here> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don't think so. > > > > > > > > > > > > > > > > > > > > > > > > > Sorry, pushed send too soon. > > > > > > > > > > > > You can create an external file iand send that as the entire > > > contents > > > > > > of the POST, so you can send whatever body you want. (omit the > name > > > > > > and mime-type parameters) > > > > > > > > > > > > But you'll need to create a new file for each new combination > of > > > > > > parameters and actual file. > > > > > > > > > > > > Might be worth trying just to check that this satisifies the > server. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, May 13, 2008 at 7:08 PM, sebb <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > This is not possible with the current release of JMeter. > > > > > > > > > > > > > > > > > > The code has been added to SVN and is in the latest > nightly > > > > build. > > > > > > > > > Please be aware that nightly builds come with no > guarantees. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 13/05/2008, Santosh Reddy <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > I want to send multiple files in the same POST > request. > > > How > > > > to do this. > > > > > > > > The > > > > > > > > > > HTTP Sampler has option to select only one file. > > > > > > > > > > And to have different set or headers for each > (multipart) > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > Thanks & Regards, > > > > > > > > > > > > > > > > > > > > Santosh Reddy. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Thanks & Regards, > > > > > > > > Santosh Reddy. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Thanks & Regards, > > > > Santosh Reddy. > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Thanks & Regards, > > > > Santosh Reddy. > > > -- Thanks & Regards, Santosh Reddy.

