cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2002-05-10 Thread mstover1

mstover102/05/10 06:00:10

  Modified:src/org/apache/jmeter/protocol/http/control
HeaderManager.java
   src/org/apache/jmeter/protocol/http/proxy Daemon.java
HttpReplyHdr.java HttpRequestHdr.java Proxy.java
   src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  proxy server work
  
  Revision  ChangesPath
  1.10  +2 -2  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/control/HeaderManager.java
  
  Index: HeaderManager.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/control/HeaderManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HeaderManager.java23 Feb 2002 01:21:06 -  1.9
  +++ HeaderManager.java10 May 2002 13:00:09 -  1.10
  @@ -77,7 +77,7 @@
* pass HTTP headers along with a request.
*
* @author  mailto:[EMAIL PROTECTED]";>Giacomo Pati
  - * @version $Revision: 1.9 $ $Date: 2002/02/23 01:21:06 $
  + * @version $Revision: 1.10 $ $Date: 2002/05/10 13:00:09 $
*/
   public class HeaderManager implements ConfigElement,JMeterComponentModel,Saveable,
Serializable
  @@ -333,7 +333,7 @@
if (header == null) {
 continue;
}
  - if (header.getName().equals(name)) {
  + if (header.getName().equalsIgnoreCase(name)) {
 removeIndices.addElement(new Integer(i));
}
  }
  
  
  
  1.6   +1 -0  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/Daemon.java
  
  Index: Daemon.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/Daemon.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Daemon.java   4 Mar 2002 23:08:54 -   1.5
  +++ Daemon.java   10 May 2002 13:00:09 -  1.6
  @@ -140,6 +140,7 @@
{
// Listen on main socket
Socket ClientSocket = MainSocket.accept();
  + ClientSocket.setSoTimeout(15 * 1000);
// Pass request to new proxy thread
Proxy thd = new Proxy(ClientSocket, cache, 
config,target,cookieManager);
thd.start();
  
  
  
  1.3   +114 -301  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java
  
  Index: HttpReplyHdr.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpReplyHdr.java 26 Jul 2001 00:34:48 -  1.2
  +++ HttpReplyHdr.java 10 May 2002 13:00:10 -  1.3
  @@ -6,6 +6,7 @@
   
   import java.net.*;
   import java.io.*;
  +import java.util.*;
   
   //
   // Class: HttpReplyHdr
  @@ -14,306 +15,118 @@
   
   public class HttpReplyHdr
   {
  -
  - static String CR="\r\n";
  - static String HTTP_PROTOCOL="HTTP/1.0";
  - static String HTTP_SERVER="Java Proxy Server";
  -
  - String lastModified ="";
  - long   contentLength=0;
  - String extraErrorString ="";
  -
  -/**
  - * Sets the last modified date for a header;
  - *
  - * @param date  A string holding an interner date
  - * @return  true
  - */
  -public boolean setModifiedDate(String date)
  - {
  - lastModified = date;
  - return true;
  - }
  -
  -/**
  - * Adds an extra explanation. This extra information is
  - * Added to the http headers failure explanation.
  - *
  - * @param str  Description to add.
  - * @return true.
  - */
  -public boolean addErrorDescription(String str)
  - {
  - extraErrorString = str;
  - return true;
  - }
  -
  -/**
  - * Forms a http ok reply header
  - *
  - * @param ContentType The mime-type of the content
  - * @returnA string with the header in it
  - */
  -public String formOk(String ContentType,long  ContentLength)
  - {
  -
  -  contentLength = ContentLength;
  -
  -  String out =new String();
  -
  -  out += HTTP_PROTOCOL + " 200 Ok" + CR;
  -  out += "Server: " + HTTP_SERVER  + CR;
  -  out += "MIME-version: 1.0"   + CR;
  -
  -  if (0 < ContentType.length())
  -   out += "Content-type: " + ContentType + CR;
  -  else
  -   out += "Content-Type: text/html" + CR;
  -
  - 

cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2002-03-15 Thread jboutcher

jboutcher02/03/15 05:28:56

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  only will print one debug message about the target it's sampling to stdout.. holds 
back the flood.
  
  Revision  ChangesPath
  1.34  +25 -3 
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- HTTPSampler.java  16 Feb 2002 03:59:11 -  1.33
  +++ HTTPSampler.java  15 Mar 2002 13:28:56 -  1.34
  @@ -78,14 +78,15 @@
   import java.util.Collection;
   import java.util.HashMap;
   import java.util.Iterator;
  +import java.util.ArrayList;
   
   /**
*  A sampler which understands all the parts necessary to read statistics about
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2002/02/16 03:59:11 $
  - *@version$Revision: 1.33 $
  + *@created$Date: 2002/03/15 13:28:56 $
  + *@version$Revision: 1.34 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -145,6 +146,10 @@
private static Category catClass = Category.getInstance(
HTTPSampler.class.getName());
   
  +/** Holds a list of URLs sampled - so we're not flooding stdout with
  + *  debug information */
  +private ArrayList m_sampledURLs = new ArrayList();
  +
/**
 *  Constructor for the HTTPSampler object
 */
  @@ -429,7 +434,24 @@
res.putValue(HTTPSampler.URL,u);
// specify the data to the result.
res.putValue(HttpSampleResult.DATA, url);
  - System.out.println("Sampling url: " + u);
  +
  +/**
  + * Whenever someone gets around to going through and 
removing all
  + * these writes to stdout, feel free to remove this 
message-caching
  + * code and just send the sampling message to the logger.. 
JKB
  + */
  +
  +// Only want to send this debug info to stdout once..
  +if(!m_sampledURLs.contains(u)) {
  +  // and we also don't want to gobble up too much memory..
  +  if(m_sampledURLs.size() < 300) {
  +m_sampledURLs.add(u);
  +System.out.println("Sampling url: " + u);
  +  }
  +}
  +
  +/** END - cached logging hack */
  +
if(catClass.isDebugEnabled())
{
catClass.debug("sample2 : sampling url - " + u);
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2002-02-15 Thread mstover1

mstover102/02/15 19:59:11

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Fixing redirect problems
  
  Revision  ChangesPath
  1.33  +6 -3  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- HTTPSampler.java  16 Feb 2002 03:21:41 -  1.32
  +++ HTTPSampler.java  16 Feb 2002 03:59:11 -  1.33
  @@ -84,8 +84,8 @@
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2002/02/16 03:21:41 $
  - *@version$Revision: 1.32 $
  + *@created$Date: 2002/02/16 03:59:11 $
  + *@version$Revision: 1.33 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -416,7 +416,10 @@
long time;
SampleResult res = new HttpSampleResult();
UrlConfig url = getUrlConfig(e);
  -
  + if(redirected)
  + {
  + url.removeArguments();
  + }
URL u = null;
try
{
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-10-11 Thread neth

neth01/10/11 05:03:49

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Added some log4j statements for debug
  
  Revision  ChangesPath
  1.29  +8 -2  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- HTTPSampler.java  2001/10/05 19:57:12 1.28
  +++ HTTPSampler.java  2001/10/11 12:03:48 1.29
  @@ -75,8 +75,8 @@
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2001/10/05 19:57:12 $
  - *@version$Revision: 1.28 $
  + *@created$Date: 2001/10/11 12:03:48 $
  + *@version$Revision: 1.29 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -345,6 +345,10 @@
res.setTime(System.currentTimeMillis() - time);
res.putValue(SampleResult.SUCCESS, new Boolean(false));
}
  + if(catClass.isDebugEnabled())
  + {
  + catClass.debug("getErrorLevel : Returning errorLevel - " + 
errorLevel);
  + }
return errorLevel;
}
   
  @@ -405,6 +409,7 @@
{
u = url.getUrl();
res.putValue(SampleResult.SAMPLE_LABEL, u.toString());
  + res.putValue(SampleResult.DISPLAY_NAME, u.toString());
res.putValue(HTTPSampler.URL,u);
// specify the data to the result.
res.putValue(HttpSampleResult.DATA, url);
  @@ -443,6 +448,7 @@
throw new IOException();
}
res.setTime(time);
  + catClass.debug("End : sample2");
return res;
}
catch (IOException ex)
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-09-13 Thread neth

neth01/09/13 07:41:16

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Minor changes to accomodate IndGraphTreeVisualizer.java
  
  Revision  ChangesPath
  1.27  +120 -121  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- HTTPSampler.java  2001/08/31 00:46:44 1.26
  +++ HTTPSampler.java  2001/09/13 14:41:16 1.27
  @@ -75,8 +75,8 @@
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2001/08/31 00:46:44 $
  - *@version$Revision: 1.26 $
  + *@created$Date: 2001/09/13 14:41:16 $
  + *@version$Revision: 1.27 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -128,13 +128,13 @@
   
protected static String encoding = "iso-8859-1";
   
  -   protected static final String NON_HTTP_RESPONSE_CODE =
  -  "Non HTTP response code";
  -   protected static final String NON_HTTP_RESPONSE_MESSAGE =
  -  "Non HTTP response message";
  + protected static final String NON_HTTP_RESPONSE_CODE = 
  + "Non HTTP response code";
  + protected static final String NON_HTTP_RESPONSE_MESSAGE = 
  + "Non HTTP response message";
   
  -   private static Category catClass = Category.getInstance(
  -  HTTPSampler.class.getName());
  + private static Category catClass = Category.getInstance(
  + HTTPSampler.class.getName());
   
/**
 *  Constructor for the HTTPSampler object
  @@ -148,7 +148,7 @@
 *
 * @param  e  Entry to be sampled
 * @returnresults of the sampling
  - * @see   
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(org.apache.jmeter.samplers.Entry,
 boolean)
  +  * @see   
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(org.apache.jmeter.samplers.Entry,
 boolean)
 */
public SampleResult sample(Entry e)
{
  @@ -158,9 +158,9 @@
/**
 *  Send POST data from Entry to the open connection.
 *
  -  * @param  connection   URLConnection of where POST data 
should be
  -  *  sent
  -  * @param  url  contains the query string for POST
  +  * @param  connection   URLConnection of where POST data should be
  +  *  sent
  +  * @param  url  contains the query string for POST
 * @exception  IOException  if an I/O exception occurs
 */
public void sendPostData(URLConnection connection, UrlConfig url)
  @@ -179,13 +179,13 @@
   
/**
 * Returns a HttpURLConnection with request method(GET or POST),
  - * headers, cookies, authorization properly set for the URL 
request
  +  * headers, cookies, authorization properly set for the URL request
 *
  -  * @param  uURL of the URL request
  -  * @param  url  UrlConfig of the URL request
  -  * @param  eEntry from which all other info can
  - *   be derived from e.g. cookies, 
header, authorization
  -  * @return  HttpURLConnection of the URL request
  +  * @param  uURL of the URL request
  +  * @param  url  UrlConfig of the URL request
  +  * @param  eEntry from which all other info can
  +   * be derived from e.g. cookies, header, authorization
  +  * @return  HttpURLConnection of the URL request
 * @exception  IOException  if an I/O Exception occurs
 */
protected HttpURLConnection setupConnection(URL u, UrlConfig url, Entry e) 
throws IOException
  @@ -208,20 +208,20 @@
 */
public UrlConfig getUrlConfig(Entry e)
{
  -  UrlConfig urlConfig = 
(UrlConfig)e.getConfigElement(UrlConfig.class);
  -  catClass.debug("getUrlConfig1 : Returning 
urlConfig - " + urlConfig);
  + UrlConfig urlConfig = (UrlConfig)e.getConfigElement(UrlConfig.class);
  + catClass.debug("getUrlConfig1 : Returning urlConfig - " + urlConfig);
return urlConfig;
}
   
/**
  -  * This method will setup HttpURLConnection to handle post using
  - * sendPostData method if the URL request is 
actually a html form
  - * that needs to be posted
  +  * This method will setup HttpURLConnection to handle post using 
  +  * sendPo

cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-08-22 Thread mstover1

mstover101/08/22 16:34:47

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Removing reference to unsupported JDK method (URLConnection.getResponseMessage()).
  
  Revision  ChangesPath
  1.24  +4 -4  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- HTTPSampler.java  2001/08/17 21:21:36 1.23
  +++ HTTPSampler.java  2001/08/22 23:34:47 1.24
  @@ -6,7 +6,7 @@
* companies.
*
* All rights reserved
  - * $Header: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
 1.23 2001/08/17 21:21:36 mstover1 Exp $
  + * $Header: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
 1.24 2001/08/22 23:34:47 mstover1 Exp $
*/
   package org.apache.jmeter.protocol.http.sampler;
   
  @@ -31,8 +31,8 @@
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2001/08/17 21:21:36 $
  - *@version$Revision: 1.23 $
  + *@created$Date: 2001/08/22 23:34:47 $
  + *@version$Revision: 1.24 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -396,7 +396,7 @@
{
// Could not sample the URL
System.out.println("URL = " + u);
  - throw new IOException(((HttpURLConnection) 
conn).getResponseMessage());
  + throw new IOException();
}
res.setTime(time);
return res;
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-08-15 Thread neth

neth01/08/15 03:45:33

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Slight modification to cater for View Result Tree visualizer
  
  Revision  ChangesPath
  1.20  +150 -36   
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- HTTPSampler.java  2001/08/09 18:48:51 1.19
  +++ HTTPSampler.java  2001/08/15 10:45:33 1.20
  @@ -6,7 +6,7 @@
* companies.
*
* All rights reserved
  - * $Header: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
 1.19 2001/08/09 18:48:51 mstover1 Exp $
  + * $Header: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
 1.20 2001/08/15 10:45:33 neth Exp $
*/
   package org.apache.jmeter.protocol.http.sampler;
   
  @@ -23,13 +23,15 @@
   import org.apache.jmeter.samplers.SampleResult;
   import org.apache.jmeter.samplers.Entry;
   
  +import org.apache.log4j.*;
  +
   /**
*  A sampler which understands all the parts necessary to read statistics about
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2001/08/09 18:48:51 $
  - *@version$Revision: 1.19 $
  + *@created$Date: 2001/08/15 10:45:33 $
  + *@version$Revision: 1.20 $
*/
   public class HTTPSampler implements Sampler
   {
  @@ -81,6 +83,14 @@
   
protected static String encoding = "iso-8859-1";
   
  +protected static final String NON_HTTP_RESPONSE_CODE = 
  +  "Non HTTP response code";
  +protected static final String NON_HTTP_RESPONSE_MESSAGE = 
  +  "Non HTTP response message";
  +
  +private static Category catClass = Category.getInstance(
  +  HTTPSampler.class.getName());
  +
/**
 *  Constructor for the HTTPSampler object
 */
  @@ -89,10 +99,11 @@
}
   
/**
  -  *  Description of the Method
  +  *  A convenience method to call sample with no redirection
 *
  -  *@param  e  Description of Parameter
  -  *@returnDescription of the Returned Value
  +  * @param  e  Entry to be sampled
  +  * @returnresults of the sampling
  + * @see   
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(org.apache.jmeter.samplers.Entry,
 boolean)
 */
public SampleResult sample(Entry e)
{
  @@ -100,11 +111,12 @@
}
   
/**
  -  *  Send POST data from Entry to the open connection.
  +  *  Send POST data from Entry to the open connection.
 *
  -  *@param  connection   Description of Parameter
  -  *@param  url  !ToDo (Parameter description)
  -  *@exception  IOException  Description of Exception
  +  * @param  connection   URLConnection of where POST data 
should be
  +  *  sent
  +  * @param  url  contains the query string for POST
  +  * @exception  IOException  if an I/O exception occurs
 */
public void sendPostData(URLConnection connection, UrlConfig url)
 throws IOException
  @@ -121,13 +133,15 @@
}
   
/**
  -  *  Description of the Method
  +  * Returns a HttpURLConnection with request method(GET or POST),
  + * headers, cookies, authorization properly set for the URL request
 *
  -  *@param  uDescription of Parameter
  -  *@param  url  Description of Parameter
  -  *@param  eDescription of Parameter
  -  *@return  Description of the Returned Value
  -  *@exception  IOException  Description of Exception
  +  * @param  uURL of the URL request
  +  * @param  url  UrlConfig of the URL request
  +  * @param  eEntry from which all other info can
  + *   be derived from e.g. cookies, header, authorization
  +  * @return  HttpURLConnection of the URL request
  +  * @exception  IOException  if an I/O Exception occurs
 */
protected HttpURLConnection setupConnection(URL u, UrlConfig url, Entry e) 
throws IOException
{
  @@ -144,21 +158,25 @@
/**
 *  Gets the UrlConfig attribute of the HTTPSampler object
 *
  -  *@param  e  Description of Parameter
  -  *@returnThe UrlConfig value
  +  * @param  e  Description of Parameter
  +  * @returnThe UrlConfig value
 */
  - protected UrlConfig getUrlConfig(Entry e)
  + public UrlConfig getUrlConfig(Entry e)
{
  -  

cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-06-07 Thread mstover1

mstover101/06/07 16:38:47

  Modified:src/org/apache/jmeter/protocol/http/config UrlConfig.java
   src/org/apache/jmeter/protocol/http/config/gui
UrlConfigGui.java
   src/org/apache/jmeter/protocol/http/control
HttpTestSample.java
   src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Fixing GET processing for URL requests.  slight UI mods
  
  Revision  ChangesPath
  1.10  +47 -6 
jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java
  
  Index: UrlConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UrlConfig.java2001/04/11 17:23:45 1.9
  +++ UrlConfig.java2001/06/07 23:38:46 1.10
  @@ -64,8 +64,8 @@
*  Apache Foundation
*
*@author Michael Stover
  - *@created$Date: 2001/04/11 17:23:45 $
  - *@version$Revision: 1.9 $
  + *@created$Date: 2001/06/07 23:38:46 $
  + *@version$Revision: 1.10 $
***/
   
   public class UrlConfig extends AbstractConfigElement
  @@ -99,20 +99,35 @@
 ***/
public URL getUrl() throws MalformedURLException
{
  - if(!getPath().startsWith("/"))
  + String pathAndQuery = null;
  + if(this.getMethod().equals(this.GET))
{
  - setPath("/"+getPath());
  + pathAndQuery = this.getPath()+"?"+getQueryString();
}
  + else
  + {
  + pathAndQuery = this.getPath();
  + }
  + if(!pathAndQuery.startsWith("/"))
  + {
  + pathAndQuery = "/" + pathAndQuery;
  + }
if(getPort() == 0)
{
  - return new URL(getProtocol(),getDomain(),getPath());
  + return new URL(getProtocol(),getDomain(),pathAndQuery);
}
else
{
  - return new URL(getProtocol(), (String)properties.get(DOMAIN), 
getPort(), (String)properties.get(PATH));
  + return new URL(getProtocol(), (String)properties.get(DOMAIN), 
getPort(),
  +   pathAndQuery);
}
}
   
  + public void setMethod(String meth)
  + {
  + properties.put(METHOD,meth);
  + }
  +
 public int getPort() {
Object port = properties.get(PORT);
if(port == null)
  @@ -206,6 +221,32 @@
{
updatePropertyIfAbsent((UrlConfig)config);
}
  + }
  +
  + public Arguments getArguments()
  + {
  + return (Arguments)getProperty(this.ARGUMENTS);
  + }
  +
  + public String getQueryString()
  + {
  + StringBuffer buf = new StringBuffer();
  + Iterator iter = getArguments().iterator();
  + boolean first = true;
  + while (iter.hasNext())
  + {
  + Argument item = (Argument)iter.next();
  + if (!first)
  + {
  + buf.append("&");
  + }
  + else
  + {
  + first = false;
  + }
  + buf.append(item.getName() + "=" + item.getValue());
  + }
  + return buf.toString();
}
   
public Class getGuiClass()
  
  
  
  1.7   +3 -3  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
  
  Index: UrlConfigGui.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- UrlConfigGui.java 2001/04/11 17:23:46 1.6
  +++ UrlConfigGui.java 2001/06/07 23:38:46 1.7
  @@ -138,7 +138,7 @@
   
private void init()
{
  - this.setLayout(new VerticalLayout(5,VerticalLayout.LEFT));
  + this.setLayout(new VerticalLayout(2,VerticalLayout.LEFT));
if(displayName)
{
namePanel = new NamePanel();
  @@ -206,7 +206,7 @@
https.setActionCommand(HTTPS);
http.addActionListener(this);
https.addActionListener(this);
  -   

cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

2001-04-10 Thread mstover1

mstover101/04/10 05:50:17

  Modified:src/org/apache/jmeter/protocol/http/sampler HTTPSampler.java
  Log:
  Fixed reference to SSLStaticProvider
  
  Revision  ChangesPath
  1.10  +3 -3  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HTTPSampler.java  2001/03/17 22:25:52 1.9
  +++ HTTPSampler.java  2001/04/10 12:50:17 1.10
  @@ -72,8 +72,8 @@
*  HTTP requests, including cookies and authentication.
*
*@author Michael Stover
  - *@created$Date: 2001/03/17 22:25:52 $
  - *@version$Revision: 1.9 $
  + *@created$Date: 2001/04/10 12:50:17 $
  + *@version$Revision: 1.10 $
***/
   public class HTTPSampler implements Sampler
   {
  @@ -392,7 +392,7 @@
{
try
{
  - Class c = 
Class.forName("org.apache.jmeter.protocol.http.util.SSL.StaticProvider");
  + Class c = 
Class.forName("org.apache.jmeter.protocol.http.util.SSLStaticProvider");
c.newInstance();
}
catch (Exception ex)
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]