Lines 28-33
import org.apache.jmeter.config.Argument;
Link Here
|
28 |
import org.apache.jmeter.config.Arguments; |
28 |
import org.apache.jmeter.config.Arguments; |
29 |
import org.apache.jmeter.testelement.property.BooleanProperty; |
29 |
import org.apache.jmeter.testelement.property.BooleanProperty; |
30 |
import org.apache.jmeter.testelement.property.JMeterProperty; |
30 |
import org.apache.jmeter.testelement.property.JMeterProperty; |
|
|
31 |
import org.apache.commons.codec.DecoderException; |
32 |
import org.apache.commons.codec.net.URLCodec; |
31 |
import org.slf4j.Logger; |
33 |
import org.slf4j.Logger; |
32 |
import org.slf4j.LoggerFactory; |
34 |
import org.slf4j.LoggerFactory; |
33 |
|
35 |
|
Lines 148-162
public class HTTPArgument extends Argument implements Serializable {
Link Here
|
148 |
if(log.isDebugEnabled()) { |
150 |
if(log.isDebugEnabled()) { |
149 |
log.debug("Decoding name, calling URLDecoder.decode with '"+name+"' and contentEncoding:"+EncoderCache.URL_ARGUMENT_ENCODING); |
151 |
log.debug("Decoding name, calling URLDecoder.decode with '"+name+"' and contentEncoding:"+EncoderCache.URL_ARGUMENT_ENCODING); |
150 |
} |
152 |
} |
151 |
name = URLDecoder.decode(name, EncoderCache.URL_ARGUMENT_ENCODING); |
153 |
//name = URLDecoder.decode(name, EncoderCache.URL_ARGUMENT_ENCODING); |
|
|
154 |
URLCodec urlCodec = new URLCodec(contentEncoding); |
155 |
name = urlCodec.decode(name,contentEncoding); |
152 |
// The value is encoded in the specified encoding |
156 |
// The value is encoded in the specified encoding |
153 |
if(log.isDebugEnabled()) { |
157 |
if(log.isDebugEnabled()) { |
154 |
log.debug("Decoding value, calling URLDecoder.decode with '"+value+"' and contentEncoding:"+contentEncoding); |
158 |
log.debug("Decoding value, calling URLDecoder.decode with '"+value+"' and contentEncoding:"+contentEncoding); |
155 |
} |
159 |
} |
156 |
value = URLDecoder.decode(value, contentEncoding); |
160 |
//value = URLDecoder.decode(value, contentEncoding); |
|
|
161 |
value = urlCodec.decode(value,contentEncoding); |
157 |
} catch (UnsupportedEncodingException e) { |
162 |
} catch (UnsupportedEncodingException e) { |
158 |
log.error(contentEncoding + " encoding not supported!"); |
163 |
log.error(contentEncoding + " encoding not supported!"); |
159 |
throw new Error(e.toString(), e); |
164 |
throw new Error(e.toString(), e); |
|
|
165 |
} catch (DecoderException e) { |
166 |
log.error(contentEncoding + " exception in decoder!"); |
167 |
throw new Error(e.toString(), e); |
160 |
} |
168 |
} |
161 |
} |
169 |
} |
162 |
setName(name); |
170 |
setName(name); |