Author: sebb
Date: Fri Nov 16 16:49:35 2007
New Revision: 595885
URL: http://svn.apache.org/viewvc?rev=595885&view=rev
Log:
Rename misnamed private method
Give access to URL string
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java?rev=595885&r1=595884&r2=595885&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Fri Nov 16 16:49:35 2007
@@ -337,10 +337,10 @@
URL pageUrl = null;
if(sampler.isProtocolDefaultPort()) {
- pageUrl = new URL(sampler.getProtocol(), sampler.getDomain(),
serverUrl());
+ pageUrl = new URL(sampler.getProtocol(), sampler.getDomain(),
getPath());
}
else {
- pageUrl = new URL(sampler.getProtocol(), sampler.getDomain(),
sampler.getPort(), serverUrl());
+ pageUrl = new URL(sampler.getProtocol(), sampler.getDomain(),
sampler.getPort(), getPath());
}
String urlWithoutQuery = getUrlWithoutQuery(pageUrl);
@@ -388,14 +388,14 @@
}
if(contentEncoding != null) {
- sampler.setPath(serverUrl(), contentEncoding);
+ sampler.setPath(getPath(), contentEncoding);
}
else {
// Although the spec says UTF-8 should be used for encoding URL
parameters,
// most browser use ISO-8859-1 for default if encoding is not
known.
// We use null for contentEncoding, then the url parameters will
be added
// with the value in the URL, and the "encode?" flag set to false
- sampler.setPath(serverUrl(), null);
+ sampler.setPath(getPath(), null);
}
if (log.isDebugEnabled())
log.debug("Proxy: setting path: " + sampler.getPath());
@@ -511,11 +511,11 @@
}
/**
- * Find the /some/file.xxxx form http://server.ect:PORT/some/file.xxx
+ * Find the /some/file.xxxx from http://server.ect:PORT/some/file.xxx
*
- * @return the deproxied url
+ * @return the path
*/
- private String serverUrl() {
+ private String getPath() {
String str = url;
int i = str.indexOf("//");
if (i > 0) {
@@ -528,6 +528,15 @@
return str.substring(i);
}
+ /**
+ * Returns the url string extracted from the first line of the client
request.
+ *
+ * @return the url
+ */
+ public String getUrl(){
+ return url;
+ }
+
/**
* Returns the next token in a string.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]