Author: sebb
Date: Fri Feb 9 07:55:47 2007
New Revision: 505335
URL: http://svn.apache.org/viewvc?view=rev&rev=505335
Log:
Comment File fields; add getSendFileAsBody() method.
Modified:
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Modified:
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?view=diff&rev=505335&r1=505334&r2=505335
==============================================================================
---
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
(original)
+++
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Fri Feb 9 07:55:47 2007
@@ -193,6 +193,8 @@
protected static final String HEADER_LOCATION = "Location"; // $NON-NLS-1$
+ protected static final String APPLICATION_X_WWW_FORM_URLENCODED =
"application/x-www-form-urlencoded";
+
// Derive the mapping of content types to parsers
private static Map parsersForType = new HashMap();
// Not synch, but it is not modified after creation
@@ -237,20 +239,43 @@
setArguments(new Arguments());
}
+ /**
+ * The name parameter to be applied to the file
+ */
public void setFileField(String value) {
setProperty(FILE_FIELD, value);
}
+ /**
+ * The name parameter to be applied to the file
+ */
public String getFileField() {
return getPropertyAsString(FILE_FIELD);
}
+ /**
+ * The actual name of the file to POST
+ */
public void setFilename(String value) {
setProperty(FILE_NAME, value);
}
+ /**
+ * The actual name of the file to POST
+ */
public String getFilename() {
return getPropertyAsString(FILE_NAME);
+ }
+
+ /**
+ * Determine if the file should be sent as the entire Post body,
+ * i.e. without any additional wrapping
+ *
+ * @return true if specified file is to be sent as the body,
+ * i.e. both FileField and MimeType are blank
+ */
+ public boolean getSendFileAsPostBody(){
+ return getFileField().length()== 0 && getMimetype().length() ==
0;
}
public void setProtocol(String value) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]