ASF Bugzilla – Attachment 33435 Details for
Bug 58852
Memory consumption when sending large files with method PUT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use less memory when using large files on PUT method
0001-Use-less-memory-when-using-large-files-on-PUT-method.patch (text/plain), 2.78 KB, created by
Felix Schumacher
on 2016-01-13 20:55:41 UTC
(
hide
)
Description:
Use less memory when using large files on PUT method
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2016-01-13 20:55:41 UTC
Size:
2.78 KB
patch
obsolete
>From 8b15cf5f359d0eda62b8335c486182a97d70b5d2 Mon Sep 17 00:00:00 2001 >From: Felix Schumacher <felix.schumacher@internetallee.de> >Date: Wed, 13 Jan 2016 21:55:04 +0100 >Subject: [PATCH] Use less memory when using large files on PUT method. > >--- > .../http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java | 7 +------ > .../http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java | 7 +------ > 2 files changed, 2 insertions(+), 12 deletions(-) > >diff --git a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java >index 2d2cf11..e5b047b 100644 >--- a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java >+++ b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java >@@ -1032,12 +1032,7 @@ public class HTTPHC3Impl extends HTTPHCAbstractImpl { > // If the request entity is repeatable, we can send it first to > // our own stream, so we can return it > if(put.getRequestEntity().isRepeatable()) { >- ByteArrayOutputStream bos = new ByteArrayOutputStream(); >- put.getRequestEntity().writeRequest(bos); >- bos.flush(); >- // We get the posted bytes using the charset that was used to create them >- putBody.append(new String(bos.toByteArray(),put.getRequestCharSet())); >- bos.close(); >+ putBody.append("<actual file content, not shown here>"); > } > else { > putBody.append("<RequestEntity was not repeatable, cannot view what was sent>"); >diff --git a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java >index 7b44a28..af96069 100644 >--- a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java >+++ b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java >@@ -1336,12 +1336,7 @@ public class HTTPHC4Impl extends HTTPHCAbstractImpl { > // our own stream, so we can return it > final HttpEntity entityEntry = entity.getEntity(); > if(entityEntry.isRepeatable()) { >- ByteArrayOutputStream bos = new ByteArrayOutputStream(); >- entityEntry.writeTo(bos); >- bos.flush(); >- // We get the posted bytes using the charset that was used to create them >- entityBody.append(new String(bos.toByteArray(), charset)); >- bos.close(); >+ entityBody.append("<actual file content, not shown here>"); > } > else { // this probably cannot happen > entityBody.append("<RequestEntity was not repeatable, cannot view what was sent>"); >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 58852
: 33435