Why does apache camel filter out HTTP headers -


i going through link : https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.0/html/web_services_and_routing_with_camel_cxf/files/proxying-headers.html

it states when building bridge applications using http or http-based components, necessary remove or filter out headings or classes of headings in route, in order ensure application behaves expected. in org.apache.camel.component.netty4.http.nettyhttpheaderfilterstrategy can seen lots of headers being filtered out follows :

protected void initialize() {     getoutfilter().add("content-length");     getoutfilter().add("content-type");     getoutfilter().add("host");     // add filter generic message header     // http://www.w3.org/protocols/rfc2616/rfc2616-sec4.html#sec4.5     getoutfilter().add("cache-control");     getoutfilter().add("connection");     getoutfilter().add("date");     getoutfilter().add("pragma");     getoutfilter().add("trailer");     getoutfilter().add("transfer-encoding");     getoutfilter().add("upgrade");     getoutfilter().add("via");     getoutfilter().add("warning");  } 

i know can override behavior implementing our own filter strategy. reason blocking headers? example, if don't block cache-control or pragma header, side effects lead to?

as far remember header filter referencing whitelist, not blacklist. i.e. let through listed (http related) headers drop other headers might have been added exchange while traveling through routes. want additional headers removed not spill beans system internals.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -