Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Expert One-on-One J2EE Design and Development
|
BOOK: Expert One-on-One J2EE Design and Development
This is the forum to discuss the Wrox book Expert One-on-One J2EE Design and Development by Rod Johnson; ISBN: 9780764543852
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Expert One-on-One J2EE Design and Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 25th, 2007, 08:08 AM
Registered User
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to send a file with HTTP Request in Jmeter

Hi,


I have the latest version of jmeter downloaded.( Version 2.2.3)
I am new to jmeter.

I need to send a binary file with the HTTP Request Post .
When i tried this i get the following error : Response Code 500 ( my request is not successful.

I filled the HTTP Request form of jmeter as below:

-------------------------------------------------------------------------------------------------------------------------------------------
File Name: Path of the file to send.
MIME : application/octet-stream
value: file name.
-------------------------------------------------------------------------------------------------------------------------------------------------



When I captured the response in wireshark i get the following response:


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hypertext Transfer Protocol
POST /skavaea/emailadaptor/pop3;jsessionid=76853F9CBDFD7E27A67901417D75E4DC HTTP/1.1\r\n
Request Method: POST
Request URI: /skavaea/emailadaptor/pop3;jsessionid=76853F9CBDFD7E27A67901417D75E4DC
Request Version: HTTP/1.1
Connection: keep-alive\r\n
Content-Type: multipart/form-data; boundary=---------------------------7d159c1302d0y0\r\n
Content-Length: 618
User-Agent: Java/1.5.0_12\r\n
Host: server17.skavamail.com\r\n
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
-------------------------------------------------------------------------------------------------------------------------------------------------------

- The size of the file which i attached with the http Request differs from the response which i get from wireshark. (Content-Length: 618 bytes, but my file size is 202 bytes)



Can anyone help me in this regard.





 
Old April 16th, 2014, 04:29 AM
Registered User
 
Join Date: Nov 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looking into response headers of your server I can see
Quote:
Accept: text/html, image/gif, image/jpeg
And as far as I understand you're trying to send
Quote:
MIME : application/octet-stream
So I would expect that the application under test would reject your upload request.

See Performance testing: Upload and Download Scenarios with Apache JMeter for how to correctly construct and send a file upload request including MIME type bit.
 
Old April 16th, 2014, 05:32 AM
Registered User
 
Join Date: Apr 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SarahFrancis
Default Premium Pure Garcinia Cambogia – Thigh time to pamper yourself !

If you wish to look your best then make use of Premium Pure Garcinia Cambogia. This is the best weight loss supplement that gets you slim figure without any side effects and without any issues. So you must give this a try so that losing weight can become easier.
https://soundcloud.com/groups/premiu...ily-and-faster





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send http post request via stored procedure kissvineet SQL Server 2000 6 August 18th, 2008 12:26 AM
how to send Http request via a trigger kissvineet .NET Web Services 0 October 28th, 2005 04:50 AM
how to send Http request via a trigger kissvineet .NET Web Services 0 October 28th, 2005 04:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.