Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 15852 invoked from network); 21 Dec 2010 21:40:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Dec 2010 21:40:52 -0000 Received: (qmail 80666 invoked by uid 500); 21 Dec 2010 21:40:52 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 80640 invoked by uid 500); 21 Dec 2010 21:40:52 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 80632 invoked by uid 99); 21 Dec 2010 21:40:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 21:40:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.216.179 as permitted sender) Received: from [209.85.216.179] (HELO mail-qy0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 21:40:45 +0000 Received: by qyj19 with SMTP id 19so4669296qyj.10 for ; Tue, 21 Dec 2010 13:40:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=z7VvYKN8Tdi9QAMf4FeJJ6ZZxHbZ2JdNvdeIBA4vYeQ=; b=O1i3b+MCOL9qOTjiGGZlU8WJR1V+toWU4MuGfk+xziDaHUoTd2BsSVcU9jNqjW4CNg mvi9e91myXpD7lIrY8boZjdDDPt47hcn94Sqk2dltQOXi0WfuX5FH89/sSfgeBJrBtDg imFmOoUY/paRUMKNHfRMkjn51jyNHr0YUs54k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gk7+g89gHGCHm5VYo07Nk52ck3++0LoVD7x2J07yoqPKiV9qSSzYtQFqQtqNigVgE8 R7oSoYNoBIiMqO4O67cr/dmHYUzbtxcugPeJ8O5sC+qfGL15wTqf7q6IeJM9+zO4mEUg V5Kze/aihG5yihgw2S5R1EumEFwE8f8fndDFo= MIME-Version: 1.0 Received: by 10.229.75.10 with SMTP id w10mr5279624qcj.109.1292967623071; Tue, 21 Dec 2010 13:40:23 -0800 (PST) Received: by 10.229.72.94 with HTTP; Tue, 21 Dec 2010 13:40:23 -0800 (PST) In-Reply-To: References: <1292923044.17188.23.camel@ubuntu> Date: Tue, 21 Dec 2010 21:40:23 +0000 Message-ID: Subject: Re: Support for servers that cannot handle Content-Transfer-Encoding: 8bit From: sebb To: HttpComponents Project Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 21 December 2010 12:00, sebb wrote: > On 21 December 2010 09:17, Oleg Kalnichevski wrote: >> On Mon, 2010-12-20 at 17:18 +0000, sebb wrote: >>> Some JMeter users are reporting problems with Post requests which contain: >>> >>> Content-Transfer-Encoding: 8bit >>> >>> in mult-part form data. >>> >>> It appears that some server code cannot handle the CTE header, and so >>> users are asking for the header to be optional. >>> >>> As far as I can tell, the CTE 8bit header is not strictly necessary >>> for recipients to be able to process the part. >>> >>> The header value defined by the StringBody class. >>> One way round this for JMeter would be to define a new sub-class and >>> override the getTransferEncoding() method. >>> >>> But it seems to me that potentially other user agents may need to >>> suppress or change the header, so perhaps the class needs some way to >>> configure the CTE value? >>> >> >> Have you tried the browser compatibility mode? HttpMime generates only a >> minimal set of headers (content-type and content-disposition for binary >> bodies) in this mode. > > Ah - I did not know about that. > I'll try that later. I assume you are referring to HttpMultipartMode.BROWSER_COMPATIBLE, which works fine. So there is no need to override the mime-type or transfer encoding values. >>> == >>> >>> By the way, the ContentDescriptor#getTransferEncoding() Javadoc says >>> that the value must not be null, yet >>> FormBodyPart.generateTransferEncoding() specifically checks for null, >>> and does not generate the field if the value is null. >>> >>> May I correct the Javadoc? >>> >> >> There is no need to ask for a permission. This project is yours as much >> as it is mine. > > Sorry, very badly worded. > > What I really meant was - is the Javadoc incorrect, or is the code incorrect? > > See also > https://issues.apache.org/jira/browse/HTTPCLIENT-1037 > > where there is a similar issue with mimeType. > > If the browser compat mode is intended to be used to suppress the > headers, maybe the Javadoc is correct, and the FormBodyPart code is > wrong? > >> Oleg >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org >> For additional commands, e-mail: dev-help@hc.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org