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

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (-2 / +10 lines)
Lines 1242-1248 Link Here
1242
        if(getUseMultipartForPost()) {
1242
        if(getUseMultipartForPost()) {
1243
            // If a content encoding is specified, we use that as the
1243
            // If a content encoding is specified, we use that as the
1244
            // encoding of any parameter values
1244
            // encoding of any parameter values
1245
            Charset charset;
1245
            Charset charset = null;
1246
            if(haveContentEncoding) {
1246
            if(haveContentEncoding) {
1247
                charset = Charset.forName(contentEncoding);
1247
                charset = Charset.forName(contentEncoding);
1248
            } else {
1248
            } else {
Lines 1255-1260 Link Here
1255
            }
1255
            }
1256
            // Write the request to our own stream
1256
            // Write the request to our own stream
1257
            MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
1257
            MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
1258
            if(haveContentEncoding) {
1259
                multipartEntityBuilder.setCharset(charset);
1260
            }
1258
            if(getDoBrowserCompatibleMultipart()) {
1261
            if(getDoBrowserCompatibleMultipart()) {
1259
                multipartEntityBuilder.setLaxMode();
1262
                multipartEntityBuilder.setLaxMode();
1260
            } else {
1263
            } else {
Lines 1268-1274 Link Here
1268
                if (arg.isSkippable(parameterName)) {
1271
                if (arg.isSkippable(parameterName)) {
1269
                    continue;
1272
                    continue;
1270
                }
1273
                }
1271
                StringBody stringBody = new StringBody(arg.getValue(), ContentType.create("text/plain", charset));
1274
                StringBody stringBody;
1275
                if(haveContentEncoding) {
1276
                    stringBody = new StringBody(arg.getValue(), ContentType.create("text/plain", charset));
1277
                } else {
1278
                    stringBody = new StringBody(arg.getValue(), ContentType.create("text/plain"));
1279
                }
1272
                FormBodyPart formPart = FormBodyPartBuilder.create(
1280
                FormBodyPart formPart = FormBodyPartBuilder.create(
1273
                        parameterName, stringBody).build();
1281
                        parameterName, stringBody).build();
1274
                multipartEntityBuilder.addPart(formPart);
1282
                multipartEntityBuilder.addPart(formPart);

Return to bug 61384