Author: sebb
Date: Tue Apr 25 17:39:37 2006
New Revision: 397032

URL: http://svn.apache.org/viewcvs?rev=397032&view=rev
Log:
Proxy-generated query parameters now saved as is to prevent unnecesary encoding

Modified:
    
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Modified: 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: 
http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=397032&r1=397031&r2=397032&view=diff
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 Tue Apr 25 17:39:37 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -489,7 +489,7 @@
         * browser's output stream to be parsed and stored correctly into the
         * UrlConfig object.
         * 
-        * For each name found, addEncodedArgument() is called
+        * For each name found, addArgument() is called
         * 
         * @param queryString -
         *            the query string
@@ -520,8 +520,15 @@
                 value="";
                        }
                        if (name.length() > 0) {
-                               addEncodedArgument(name, value, metaData);
-                       }
+                // The browser has already done the encoding, so save the 
values as is 
+                HTTPArgument arg = new HTTPArgument(name, value, metaData, 
false);
+                // and make sure they stay that way:
+                arg.setAlwaysEncoded(false);
+                // Note that URL.encode()/decode() do not follow RFC3986 
entirely
+                               this.getArguments().addArgument(arg);
+                               // TODO: this leaves the arguments in encoded 
form, which may be difficult to read
+                // if we can find proper coding methods, this could be tidied 
up 
+            }
                }
        }
 



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

Reply via email to