You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ne...@apache.org on 2001/11/29 15:25:23 UTC
cvs commit: jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy HttpRequestHdr.java
neth 01/11/29 06:25:23
Modified: src/org/apache/jmeter/protocol/http/proxy
HttpRequestHdr.java
Log:
Added codes to allow HTTP POST through Proxy Server
Revision Changes Path
1.4 +23 -5 jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Index: HttpRequestHdr.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HttpRequestHdr.java 2001/10/31 17:23:02 1.3
+++ HttpRequestHdr.java 2001/11/29 14:25:23 1.4
@@ -72,6 +72,7 @@
* blank.
*/
public int contentLength = -1;
+
/**
* The content length of a remote copy of the requested object.
*/
@@ -87,6 +88,8 @@
*/
public boolean pragmaNoCache = false;
+ public String postData = new String();
+
static String CR ="\r\n";
@@ -122,21 +125,35 @@
url = getToken(tz);
version= getToken(tz);
- while (true)
+ while (true)
{
- try
+ try
{
tz = new StringTokenizer(lines.readLine());
- }
+ }
catch (Exception e)
{
return false;
- }
+ }
String Token = getToken(tz);
// look for termination of HTTP command
if (0 == Token.length())
- break;
+ {
+ if(method.equals("POST"))
+ {
+ try
+ {
+ postData = lines.readLine();
+ }
+ catch (Exception e)
+ {
+ System.out.println("fucked up trying to read post data");
+ break;
+ }
+ }
+ break;
+ }
if (Token.equalsIgnoreCase("USER-AGENT:")) {
// line =<User-Agent: <Agent Description>>
@@ -182,6 +199,7 @@
} else if (Token.equalsIgnoreCase("CONTENT-LENGTH:")) {
Token = getToken(tz);
contentLength =Integer.parseInt(Token);
+
} else if (Token.equalsIgnoreCase("CONTENT-TYPE:")) {
contentType = getRemainder(tz);
} else {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>