mirror of https://github.com/apache/jmeter.git
				
				
				
			HTTP default encoding is ISO-8859-1; use default encoding if blank
git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@595493 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 50265a75c6
			
			
This commit is contained in:
		
							parent
							
								
									0f187c9160
								
							
						
					
					
						commit
						7ee6947c5b
					
				|  | @ -43,6 +43,8 @@ import org.apache.log.Logger; | |||
|  */ | ||||
| public class SampleResult implements Serializable { | ||||
| 
 | ||||
|     public static final String DEFAULT_HTTP_ENCODING = "ISO-8859-1";  // $NON-NLS-1$ | ||||
| 
 | ||||
| 	// Needs to be accessible from Test code | ||||
|     static final Logger log = LoggingManager.getLoggerForClass(); | ||||
| 
 | ||||
|  | @ -53,7 +55,7 @@ public class SampleResult implements Serializable { | |||
|     // needs to be accessible from test code | ||||
| 	static final String DEFAULT_ENCODING  | ||||
|             = JMeterUtils.getPropDefault("sampleresult.default.encoding", // $NON-NLS-1$ | ||||
| 			"ISO-8859-1"); // $NON-NLS-1$ | ||||
| 			DEFAULT_HTTP_ENCODING); | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Data type value indicating that the response data is text. | ||||
|  | @ -612,7 +614,7 @@ public class SampleResult implements Serializable { | |||
| 	 * Returns the dataEncoding or the default if no dataEncoding was provided | ||||
| 	 */ | ||||
| 	public String getDataEncodingWithDefault() { | ||||
| 		if (dataEncoding != null) { | ||||
| 		if (dataEncoding != null && dataEncoding.length() > 0) { | ||||
| 			return dataEncoding; | ||||
| 		} | ||||
| 		return DEFAULT_ENCODING; | ||||
|  |  | |||
|  | @ -40,6 +40,7 @@ public class HTTPSampleResult extends SampleResult { | |||
| 
 | ||||
| 	public HTTPSampleResult() { | ||||
| 		super(); | ||||
| 		setDataEncoding(DEFAULT_HTTP_ENCODING); // default if encoding not provided be the page | ||||
| 	} | ||||
| 
 | ||||
| 	public HTTPSampleResult(long elapsed) { | ||||
|  |  | |||
|  | @ -62,6 +62,8 @@ Filenames can now include function references; variable references do not work.< | |||
| Fix SamplingStatCalculator so it no longer adds elapsed time to endTime, as this is handled by SampleResult. | ||||
| This corrects discrepancies between Summary Report and Aggregate Report throughput calculation. | ||||
| </li> | ||||
| <li>Default HTTPSampleResult to ISO-8859-1 encoding</li> | ||||
| <li>Fix default encoding for blank encoding</li> | ||||
| </ul> | ||||
| 
 | ||||
| <h4>Improvements</h4> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue