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

