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

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (-2 / +12 lines)
Lines 231-237 Link Here
231
        
231
        
232
        HttpRequestBase httpRequest = null;
232
        HttpRequestBase httpRequest = null;
233
        try {
233
        try {
234
            URI uri = url.toURI();
234
            URI uri = new URI(url.getProtocol(), 
235
                              null /*userInfo*/,
236
                              url.getHost(), 
237
                              url.getPort(), 
238
                              url.getPath(), 
239
                              url.getQuery(), 
240
                              null /*fragment*/);
241
235
            if (method.equals(HTTPConstants.POST)) {
242
            if (method.equals(HTTPConstants.POST)) {
236
                httpRequest = new HttpPost(uri);
243
                httpRequest = new HttpPost(uri);
237
            } else if (method.equals(HTTPConstants.PUT)) {
244
            } else if (method.equals(HTTPConstants.PUT)) {
Lines 249-255 Link Here
249
            } else if (method.equals(HTTPConstants.PATCH)) {
256
            } else if (method.equals(HTTPConstants.PATCH)) {
250
                httpRequest = new HttpPatch(uri);
257
                httpRequest = new HttpPatch(uri);
251
            } else {
258
            } else {
252
                throw new IllegalArgumentException("Unexpected method: "+method);
259
                throw new IllegalArgumentException(String.format("Unexpected method: \"%s\" for url: \"%s\" frameDepth=%d", 
260
                                                                 method,
261
                                                                 url.toString(),
262
                                                                 frameDepth));
253
            }
263
            }
254
            setupRequest(url, httpRequest, res); // can throw IOException
264
            setupRequest(url, httpRequest, res); // can throw IOException
255
        } catch (Exception e) {
265
        } catch (Exception e) {

Return to bug 54142