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

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (+4 lines)
Lines 108-113 Link Here
108
import org.apache.jmeter.protocol.http.control.CacheManager;
108
import org.apache.jmeter.protocol.http.control.CacheManager;
109
import org.apache.jmeter.protocol.http.control.CookieManager;
109
import org.apache.jmeter.protocol.http.control.CookieManager;
110
import org.apache.jmeter.protocol.http.control.HeaderManager;
110
import org.apache.jmeter.protocol.http.control.HeaderManager;
111
import org.apache.jmeter.protocol.http.sampler.HttpWebdav;
111
import org.apache.jmeter.protocol.http.util.EncoderCache;
112
import org.apache.jmeter.protocol.http.util.EncoderCache;
112
import org.apache.jmeter.protocol.http.util.HC4TrustAllSSLSocketFactory;
113
import org.apache.jmeter.protocol.http.util.HC4TrustAllSSLSocketFactory;
113
import org.apache.jmeter.protocol.http.util.HTTPArgument;
114
import org.apache.jmeter.protocol.http.util.HTTPArgument;
Lines 296-301 Link Here
296
                httpRequest = new HttpGet(uri);
297
                httpRequest = new HttpGet(uri);
297
            } else if (method.equals(HTTPConstants.PATCH)) {
298
            } else if (method.equals(HTTPConstants.PATCH)) {
298
                httpRequest = new HttpPatch(uri);
299
                httpRequest = new HttpPatch(uri);
300
            } else if (HttpWebdav.isWebdavMethod(method)) {
301
                httpRequest = new HttpWebdav(method, uri);
299
            } else {
302
            } else {
300
                throw new IllegalArgumentException("Unexpected method: '"+method+"'");
303
                throw new IllegalArgumentException("Unexpected method: '"+method+"'");
301
            }
304
            }
Lines 438-443 Link Here
438
            String postBody = sendPostData((HttpPost)httpRequest);
441
            String postBody = sendPostData((HttpPost)httpRequest);
439
            result.setQueryString(postBody);
442
            result.setQueryString(postBody);
440
        } else if (method.equals(HTTPConstants.PUT) || method.equals(HTTPConstants.PATCH)
443
        } else if (method.equals(HTTPConstants.PUT) || method.equals(HTTPConstants.PATCH)
444
                || HttpWebdav.isWebdavMethod(method)
441
                || method.equals(HTTPConstants.DELETE)) {
445
                || method.equals(HTTPConstants.DELETE)) {
442
            String entityBody = sendEntityData(( HttpEntityEnclosingRequestBase)httpRequest);
446
            String entityBody = sendEntityData(( HttpEntityEnclosingRequestBase)httpRequest);
443
            result.setQueryString(entityBody);
447
            result.setQueryString(entityBody);
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java (+1 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
                    || HttpWebdav.isWebdavMethod(method)
141
                    || HTTPConstants.DELETE.equals(method)) {
142
                    || HTTPConstants.DELETE.equals(method)) {
142
                sb.append("\n"+method+" data:\n");
143
                sb.append("\n"+method+" data:\n");
143
                sb.append(queryString);
144
                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$
(-)xdocs/usermanual/component_reference.xml (-1 / +4 lines)
Lines 152-157 Link Here
152
         See Java bugs 6226610 and 6208335.
152
         See Java bugs 6226610 and 6208335.
153
         </li>
153
         </li>
154
         <li>It does not support virtual hosts.</li>
154
         <li>It does not support virtual hosts.</li>
155
         <li>It does not support the following methods: COPY, LOCK, MKCOL, MOVE, PATCH, PROPFIND, PROPPATCH, UNLOCK.</li>
155
         </ul>
156
         </ul>
156
         <p>Note: the FILE protocol is intended for testing purposes only.
157
         <p>Note: the FILE protocol is intended for testing purposes only.
157
         It is handled by the same code regardless of which HTTP Sampler is used.</p>
158
         It is handled by the same code regardless of which HTTP Sampler is used.</p>
Lines 222-228 Link Here
222
        If not specified (and not defined by HTTP Request Defaults), the default depends on the value of the JMeter property
223
        If not specified (and not defined by HTTP Request Defaults), the default depends on the value of the JMeter property
223
        <code>jmeter.httpsampler</code>, failing that, the HttpClient4 implementation is used.</property>
224
        <code>jmeter.httpsampler</code>, failing that, the HttpClient4 implementation is used.</property>
224
        <property name="Protocol" required="No">HTTP, HTTPS or FILE. Default: HTTP</property>
225
        <property name="Protocol" required="No">HTTP, HTTPS or FILE. Default: HTTP</property>
225
        <property name="Method" required="Yes">GET, POST, HEAD, TRACE, OPTIONS, PUT, DELETE, PATCH (not supported for JAVA implementation)</property>
226
        <property name="Method" required="Yes">GET, POST, HEAD, TRACE, OPTIONS, PUT, DELETE, PATCH (not supported for
227
        JAVA implementation). With HttpClient4, the following methods are also allowed: COPY, LOCK, MKCOL, MOVE,
228
        PROPFIND, PROPPATCH, UNLOCK.</property>
226
        <property name="Content Encoding" required="No">
229
        <property name="Content Encoding" required="No">
227
        Content encoding to be used (for POST, PUT, PATCH and FILE). 
230
        Content encoding to be used (for POST, PUT, PATCH and FILE). 
228
        This the the character encoding to be used, and is not related to the Content-Encoding HTTP header.
231
        This the the character encoding to be used, and is not related to the Content-Encoding HTTP header.

Return to bug 57107