ASF Bugzilla – Attachment 34718 Details for
Bug 60682
HTTP Request : Get method may fail on redirect due to Content-Length header being set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't use a body on a GET request, that is send on redirect
bug-60682-redirect.diff (text/plain), 1.08 KB, created by
Felix Schumacher
on 2017-02-06 14:23:09 UTC
(
hide
)
Description:
Don't use a body on a GET request, that is send on redirect
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2017-02-06 14:23:09 UTC
Size:
1.08 KB
patch
obsolete
>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 09ece48..a90697c 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 >@@ -362,8 +362,8 @@ public class HTTPHC4Impl extends HTTPHCAbstractImpl { > // Some servers fail if Content-Length is equal to 0 > // so to avoid this we use HttpGet when there is no body (Content-Length will not be set) > // otherwise we use HttpGetWithEntity >- if ( (!hasArguments() && getSendFileAsPostBody()) >- || getSendParameterValuesAsPostBody() ) { >+ if ( !areFollowingRedirect && ((!hasArguments() && getSendFileAsPostBody()) >+ || getSendParameterValuesAsPostBody()) ) { > httpRequest = new HttpGetWithEntity(uri); > } else { > httpRequest = new HttpGet(uri);
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 60682
:
34712
|
34713
| 34718 |
34721
|
34722
|
34723
|
34724
|
34725
|
34726
|
34727