camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: [1/2] git commit: CAMEL-7457 Does not override the "Content-Type" header of CXF response
Date Mon, 26 May 2014 06:33:42 GMT
Hi Claus,

The old patch is not actually right. I added an unit test and polished the code with your
suggestion.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 26, 2014 at 2:10:22 PM, Claus Ibsen (claus.ibsen@gmail.com) wrote:
> Hi
>  
> I am a bit -0 on this.
>  
> I would like to we have an unit test also, as there is a "change" that
> changes something.
>  
> Also I do not think adding Content-Type to the regular exp is a good
> solution. As the regular exp should just be about
> Camel/org.apache.camel headers. So is it not possible to add it like
> the others above
>  
> Something like
> getOutFilter().add(Exchange.CONTENT_TYPE);
>  
> And then have an unit test to ensure we test this change, and guard
> against regressions etc.
>  
>  
>  
> On Mon, May 26, 2014 at 5:56 AM, wrote:
> > Repository: camel
> > Updated Branches:
> > refs/heads/master efcff6eae -> 3451fb641
> >
> >
> > CAMEL-7457 Does not override the "Content-Type" header of CXF response
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/camel/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3451fb64
> > Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3451fb64
> > Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3451fb64
> >
> > Branch: refs/heads/master
> > Commit: 3451fb64181f3bb2c0fab84e268149a067819c3d
> > Parents: d8df3b7
> > Author: Seiji Sogabe  
> > Authored: Sun May 25 21:44:14 2014 +0900
> > Committer: Willem Jiang  
> > Committed: Mon May 26 11:55:47 2014 +0800
> >
> > ----------------------------------------------------------------------  
> > .../camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > ----------------------------------------------------------------------  
> >
> >
> > http://git-wip-us.apache.org/repos/asf/camel/blob/3451fb64/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
 
> > ----------------------------------------------------------------------  
> > diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
 
> b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
 
> > index 50a31e0..fc69c60 100644
> > --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
 
> > +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
 
> > @@ -40,7 +40,7 @@ public class CxfRsHeaderFilterStrategy extends DefaultHeaderFilterStrategy
 
> {
> > getOutFilter().add(Exchange.HTTP_PATH);
> > getOutFilter().add(Exchange.DESTINATION_OVERRIDE_URL);
> > // filter headers begin with "Camel" or "org.apache.camel"
> > - setOutFilterPattern("(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*");  
> > + setOutFilterPattern("((Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]|(?i)Content-Type)*");
 
> >
> > }
> >
> >
>  
>  
>  
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>  


Mime
View raw message