Return-Path: X-Original-To: apmail-jmeter-dev-archive@minotaur.apache.org Delivered-To: apmail-jmeter-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0045A184E4 for ; Sun, 5 Jul 2015 12:46:52 +0000 (UTC) Received: (qmail 73820 invoked by uid 500); 5 Jul 2015 12:46:51 -0000 Delivered-To: apmail-jmeter-dev-archive@jmeter.apache.org Received: (qmail 73799 invoked by uid 500); 5 Jul 2015 12:46:51 -0000 Mailing-List: contact dev-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list dev@jmeter.apache.org Received: (qmail 73785 invoked by uid 99); 5 Jul 2015 12:46:51 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jul 2015 12:46:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 78B05D24F6 for ; Sun, 5 Jul 2015 12:46:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uuho-E8qHJZp for ; Sun, 5 Jul 2015 12:46:49 +0000 (UTC) Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id EAEE42122B for ; Sun, 5 Jul 2015 12:46:48 +0000 (UTC) Received: by igcsj18 with SMTP id sj18so215637437igc.1 for ; Sun, 05 Jul 2015 05:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=OPO+gl+HKXFTdw1g/exnG+YThnz6rqCfN8vm5KQXMVM=; b=hhgOQV4YdvjiJCcFs5oAb2EB7P6V/kwiaVJ7tqqZj5usZILCmEVW5uMKN/z5flwQpp aLERXr5L1/l6Iz9XgOSkxkZ5eop4ahgB/cAyabjaHAsRfXGwfl+05PNFK+IO6/Qiqk5m bY07Ol5ZoM4fgrpR6qKrNcZ/PbFy36Bg+cwVESo95I+QlSYoliO7GC/D3mx5Gg6w1tS1 5/0DV6bH5PNLuqslq4rBL8C/uJXfERN0MfQCDVPs1+kZLrn1HHMQX0h/CmomnJf0ltxz GSpsJy/4kMluqeguXeifi56/N7MtZdEkv63FgiAi+QWD7pQ7weN4Kv7MI4bnZAnELo+C nc5g== MIME-Version: 1.0 X-Received: by 10.107.149.14 with SMTP id x14mr49235115iod.87.1436100407949; Sun, 05 Jul 2015 05:46:47 -0700 (PDT) Received: by 10.107.180.22 with HTTP; Sun, 5 Jul 2015 05:46:47 -0700 (PDT) Date: Sun, 5 Jul 2015 14:46:47 +0200 Message-ID: Subject: Regression in 4.5 vs 4.2.6 From: Philippe Mouawad To: HttpClient User Discussion Cc: "dev@jmeter.apache.org" Content-Type: multipart/alternative; boundary=001a1140f6e8ad8008051a202eb6 --001a1140f6e8ad8008051a202eb6 Content-Type: text/plain; charset=UTF-8 Hello, We upgraded recently JMeter in a branch from HttpClient 4.2.6 to 4.5 and are facing what seems to be a regression. It seems that when we don't set a charset in StringBody , MultipartEntity, FormBodyPart, no charset is written in ContentType generation while it was the case at least in 4.2.6, I think issue was introduced in 4.3. Note also that javadocs of these components say: @param charset the character set to use, may be {@code null}, in which case {@link MIME#DEFAULT_CHARSET} - i.e. US-ASCII - is used. But it's not the case since 4.3 Reading the sepcs, I am not sure that when charset is US-ASCII , it should be written but it was the case in 4.2.6. I created https://issues.apache.org/jira/browse/HTTPCLIENT-1665 As a test case, you can have a look at JMeter test cases: org.apache.jmeter.protocol.http.sampler.TestHTTPSamplersAgainstHttpMirrorServer#testPostRequest_FormMultipart3 org.apache.jmeter.protocol.http.sampler.TestHTTPSamplersAgainstHttpMirrorServer#testPostRequest_FileUpload3 The issue appears when no contentEncoding is set. Thanks for help. Regards Philippe M. --001a1140f6e8ad8008051a202eb6--