Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C9886588 for ; Wed, 13 Jul 2011 17:47:24 +0000 (UTC) Received: (qmail 27545 invoked by uid 500); 13 Jul 2011 17:47:24 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 27246 invoked by uid 500); 13 Jul 2011 17:47:23 -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 27197 invoked by uid 99); 13 Jul 2011 17:47:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 17:47:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 17:47:22 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 115B74E151 for ; Wed, 13 Jul 2011 17:47:01 +0000 (UTC) Date: Wed, 13 Jul 2011 17:47:01 +0000 (UTC) From: "William R. Speirs (JIRA)" To: dev@hc.apache.org Message-ID: <552511531.10554.1310579221067.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1751152463.6346.1310484719876.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HTTPCORE-264) Allow Overwriting of Content-Length & Transfer-Encoding Headers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCORE-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064722#comment-13064722 ] William R. Speirs commented on HTTPCORE-264: -------------------------------------------- This is a good point, and noted. I have added two additional unit tests and will attach that diff as well. Thanks! > Allow Overwriting of Content-Length & Transfer-Encoding Headers > --------------------------------------------------------------- > > Key: HTTPCORE-264 > URL: https://issues.apache.org/jira/browse/HTTPCORE-264 > Project: HttpComponents HttpCore > Issue Type: Improvement > Components: HttpCore > Affects Versions: 4.1.2, 4.2-alpha1, 4.2, Future > Environment: n/a > Reporter: William R. Speirs > Priority: Trivial > Labels: patch > Fix For: 4.1.2, 4.2, Future > > Attachments: ResponseContent.diff, TestStandardInterceptors.diff > > > Currently the ResponseContent interceptor will throw an exception if the Content-Length or Transfer-Encoding headers are found in the response. I am proposing a patch which adds 2 new constructors to ResponseContent. These new constructors allow ResponseContent to overwrite the Content-Length and/or Transfer-Encoding headers if they're already found instead of throwing an exception. > The biggest use I see for this is in a reverse proxy. The response from the proxied server will already have proper Content-Length and Transfer-Encoding headers. However, this interceptor throws an exception in this case. The simple answer is to remove this interceptor; however, I would like to clean-up any response where these headers might be missing. > The default constructor is to thrown an exception if these headers are found. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org