[prev in list] [next in list] [prev in thread] [next in thread]
List: slide-dev
Subject: svn commit: r1095590 -
From: sebb () apache ! org
Date: 2011-04-21 1:48:21
Message-ID: 20110421014821.8C48123889FD () eris ! apache ! org
[Download RAW message or body]
Author: sebb
Date: Thu Apr 21 01:48:21 2011
New Revision: 1095590
URL: http://svn.apache.org/viewvc?rev=1095590&view=rev
Log:
Ensure content-type is always set
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jm \
eter/protocol/http/sampler/HTTPHC4Impl.java?rev=1095590&r1=1095589&r2=1095590&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java \
(original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java \
Thu Apr 21 01:48:21 2011 @@ -266,16 +266,16 @@ public class HTTPHC4Impl extends \
HTTPHCA // Needs to be done after execute to pick up all the headers
res.setRequestHeaders(getConnectionHeaders((HttpRequest) \
localContext.getAttribute(ExecutionContext.HTTP_REQUEST)));
+ Header contentType = httpResponse.getLastHeader(HEADER_CONTENT_TYPE);
+ if (contentType != null){
+ String ct = contentType.getValue();
+ res.setContentType(ct);
+ res.setEncodingAndType(ct);
+ }
HttpEntity entity = httpResponse.getEntity();
if (entity != null) {
InputStream instream = entity.getContent();
res.setResponseData(readResponse(res, instream, (int) \
entity.getContentLength()));
- Header contentType = entity.getContentType();
- if (contentType != null){
- String ct = contentType.getValue();
- res.setContentType(ct);
- res.setEncodingAndType(ct);
- }
}
res.sampleEnd(); // Done with the sampling proper.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic