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

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (-2 / +34 lines)
Lines 263-269 Link Here
263
            return HTTPConstants.DELETE;
263
            return HTTPConstants.DELETE;
264
        }
264
        }
265
    }
265
    }
266
    
266
267
    public static final class HttpWebdav extends HttpEntityEnclosingRequestBase {
268
269
        private String davMethod;
270
271
        public HttpWebdav(final String davMethod, final URI uri) {
272
            super();
273
            this.davMethod = davMethod;
274
            setURI(uri);
275
        }
276
277
        @Override
278
        public String getMethod() {
279
            return davMethod;
280
        }
281
    }
282
267
    @Override
283
    @Override
268
    protected HTTPSampleResult sample(URL url, String method,
284
    protected HTTPSampleResult sample(URL url, String method,
269
            boolean areFollowingRedirect, int frameDepth) {
285
            boolean areFollowingRedirect, int frameDepth) {
Lines 296-301 Link Here
296
                httpRequest = new HttpGet(uri);
312
                httpRequest = new HttpGet(uri);
297
            } else if (method.equals(HTTPConstants.PATCH)) {
313
            } else if (method.equals(HTTPConstants.PATCH)) {
298
                httpRequest = new HttpPatch(uri);
314
                httpRequest = new HttpPatch(uri);
315
            } else if (method.equals(HTTPConstants.PROPFIND)
316
                    || method.equals(HTTPConstants.PROPPATCH)
317
                    || method.equals(HTTPConstants.MKCOL)
318
                    || method.equals(HTTPConstants.COPY)
319
                    || method.equals(HTTPConstants.MOVE)
320
                    || method.equals(HTTPConstants.LOCK)
321
                    || method.equals(HTTPConstants.UNLOCK)) {
322
                httpRequest = new HttpWebdav(method, uri);
299
            } else {
323
            } else {
300
                throw new IllegalArgumentException("Unexpected method: '"+method+"'");
324
                throw new IllegalArgumentException("Unexpected method: '"+method+"'");
301
            }
325
            }
Lines 438-444 Link Here
438
            String postBody = sendPostData((HttpPost)httpRequest);
462
            String postBody = sendPostData((HttpPost)httpRequest);
439
            result.setQueryString(postBody);
463
            result.setQueryString(postBody);
440
        } else if (method.equals(HTTPConstants.PUT) || method.equals(HTTPConstants.PATCH)
464
        } else if (method.equals(HTTPConstants.PUT) || method.equals(HTTPConstants.PATCH)
441
                || method.equals(HTTPConstants.DELETE)) {
465
                || method.equals(HTTPConstants.PROPFIND)
466
                || method.equals(HTTPConstants.PROPPATCH)
467
                || method.equals(HTTPConstants.MKCOL)
468
                || method.equals(HTTPConstants.COPY)
469
                || method.equals(HTTPConstants.MOVE)
470
                || method.equals(HTTPConstants.LOCK)
471
                || method.equals(HTTPConstants.UNLOCK)
472
                || method.equals(HTTPConstants.DELETE)
473
                ) {
442
            String entityBody = sendEntityData(( HttpEntityEnclosingRequestBase)httpRequest);
474
            String entityBody = sendEntityData(( HttpEntityEnclosingRequestBase)httpRequest);
443
            result.setQueryString(entityBody);
475
            result.setQueryString(entityBody);
444
        }
476
        }
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java (+7 lines)
Lines 138-143 Link Here
138
            // Include request body if it is a post or put or patch
138
            // Include request body if it is a post or put or patch
139
            if (HTTPConstants.POST.equals(method) || HTTPConstants.PUT.equals(method) 
139
            if (HTTPConstants.POST.equals(method) || HTTPConstants.PUT.equals(method) 
140
                    || HTTPConstants.PATCH.equals(method)
140
                    || HTTPConstants.PATCH.equals(method)
141
                    || HTTPConstants.PROPFIND.equals(method)
142
                    || HTTPConstants.PROPPATCH.equals(method)
143
                    || HTTPConstants.MKCOL.equals(method)
144
                    || HTTPConstants.COPY.equals(method)
145
                    || HTTPConstants.MOVE.equals(method)
146
                    || HTTPConstants.LOCK.equals(method)
147
                    || HTTPConstants.UNLOCK.equals(method)
141
                    || HTTPConstants.DELETE.equals(method)) {
148
                    || HTTPConstants.DELETE.equals(method)) {
142
                sb.append("\n"+method+" data:\n");
149
                sb.append("\n"+method+" data:\n");
143
                sb.append(queryString);
150
                sb.append(queryString);
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (+7 lines)
Lines 232-237 Link Here
232
        HTTPConstants.TRACE,
232
        HTTPConstants.TRACE,
233
        HTTPConstants.DELETE,
233
        HTTPConstants.DELETE,
234
        HTTPConstants.PATCH,
234
        HTTPConstants.PATCH,
235
        HTTPConstants.PROPFIND,
236
        HTTPConstants.PROPPATCH,
237
        HTTPConstants.MKCOL,
238
        HTTPConstants.COPY,
239
        HTTPConstants.MOVE,
240
        HTTPConstants.LOCK,
241
        HTTPConstants.UNLOCK
235
        };
242
        };
236
243
237
    private static final List<String> METHODLIST = Collections.unmodifiableList(Arrays.asList(METHODS));
244
    private static final List<String> METHODLIST = Collections.unmodifiableList(Arrays.asList(METHODS));
(-)src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java (+7 lines)
Lines 39-44 Link Here
39
    String TRACE = "TRACE"; // $NON-NLS-1$
39
    String TRACE = "TRACE"; // $NON-NLS-1$
40
    String DELETE = "DELETE"; // $NON-NLS-1$
40
    String DELETE = "DELETE"; // $NON-NLS-1$
41
    String PATCH = "PATCH"; // $NON-NLS-1$
41
    String PATCH = "PATCH"; // $NON-NLS-1$
42
    String PROPFIND = "PROPFIND"; // $NON-NLS-1$
43
    String PROPPATCH = "PROPPATCH"; // $NON-NLS-1$
44
    String MKCOL = "MKCOL"; // $NON-NLS-1$
45
    String COPY = "COPY"; // $NON-NLS-1$
46
    String MOVE = "MOVE"; // $NON-NLS-1$
47
    String LOCK = "LOCK"; // $NON-NLS-1$
48
    String UNLOCK = "UNLOCK"; // $NON-NLS-1$
42
    String CONNECT = "CONNECT"; // $NON-NLS-1$
49
    String CONNECT = "CONNECT"; // $NON-NLS-1$
43
    String HEADER_AUTHORIZATION = "Authorization"; // $NON-NLS-1$
50
    String HEADER_AUTHORIZATION = "Authorization"; // $NON-NLS-1$
44
    String HEADER_COOKIE = "Cookie"; // $NON-NLS-1$
51
    String HEADER_COOKIE = "Cookie"; // $NON-NLS-1$

Return to bug 57107