ASF Bugzilla – Attachment 33645 Details for
Bug 59083
HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make HC3 Impl aware of all possible http methods
02-hc3.diff (text/plain), 1.96 KB, created by
Felix Schumacher
on 2016-03-07 21:06:13 UTC
(
hide
)
Description:
Make HC3 Impl aware of all possible http methods
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2016-03-07 21:06:13 UTC
Size:
1.96 KB
patch
obsolete
>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 c878b8e..7160245 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 >@@ -224,20 +224,8 @@ public class HTTPHC3Impl extends HTTPHCAbstractImpl { > httpMethod = new TraceMethod(urlStr); > } else if (method.equals(HTTPConstants.OPTIONS)){ > httpMethod = new OptionsMethod(urlStr); >- } else if (method.equals(HTTPConstants.DELETE)){ >- httpMethod = new EntityEnclosingMethod(urlStr) { >- @Override >- public String getName() { // HC3.1 does not have the method >- return HTTPConstants.DELETE; >- } >- }; >- } else if (method.equals(HTTPConstants.PATCH)){ >- httpMethod = new EntityEnclosingMethod(urlStr) { >- @Override >- public String getName() { // HC3.1 does not have the method >- return HTTPConstants.PATCH; >- } >- }; >+ } else if (HttpWebdav.isWebdavMethod(method)) { >+ httpMethod = new WebdavMethod(urlStr, method); > } else { > throw new IllegalArgumentException("Unexpected method: '"+method+"'"); > } >@@ -1147,4 +1135,18 @@ public class HTTPHC3Impl extends HTTPHCAbstractImpl { > return client != null; > } > >+ private static class WebdavMethod extends EntityEnclosingMethod { >+ private final String method; >+ >+ public WebdavMethod(String urlstr, String method) { >+ super(urlstr); >+ this.method = method; >+ } >+ >+ @Override >+ public String getName() { >+ return this.method; >+ } >+ } >+ > }
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 59083
:
33603
|
33604
|
33606
|
33644
| 33645