View | Details | Raw Unified | Return to bug 60652
Collapse All | Expand All

(-)a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (-4 / +7 lines)
Lines 20-25 package org.apache.jmeter.protocol.http.sampler; Link Here
20
20
21
import java.io.ByteArrayOutputStream;
21
import java.io.ByteArrayOutputStream;
22
import java.io.File;
22
import java.io.File;
23
import java.io.InputStream;
23
import java.io.IOException;
24
import java.io.IOException;
24
import java.io.OutputStream;
25
import java.io.OutputStream;
25
import java.io.UnsupportedEncodingException;
26
import java.io.UnsupportedEncodingException;
Lines 1455-1464 public class HTTPHC4Impl extends HTTPHCAbstractImpl { Link Here
1455
            if(entityEntry.isRepeatable()) {
1456
            if(entityEntry.isRepeatable()) {
1456
                entityBody = new StringBuilder(1000);
1457
                entityBody = new StringBuilder(1000);
1457
                // FIXME Charset
1458
                // FIXME Charset
1458
                entityBody.append(IOUtils.toString(new BoundedInputStream(
1459
                try (InputStream in = entityEntry.getContent();
1459
                        entityEntry.getContent(), MAX_BODY_RETAIN_SIZE)));
1460
                        InputStream bounded = new BoundedInputStream(in, MAX_BODY_RETAIN_SIZE)) {
1460
                if (entityEntry.getContentLength() > MAX_BODY_RETAIN_SIZE) {
1461
                    entityBody.append(IOUtils.toString(bounded));
1461
                    entityBody.append("<actual file content shortened>");
1462
                    if (entityEntry.getContentLength() > MAX_BODY_RETAIN_SIZE) {
1463
                        entityBody.append("<actual file content shortened>");
1464
                    }
1462
                }
1465
                }
1463
            }
1466
            }
1464
            else { 
1467
            else { 

Return to bug 60652