On the client side, for a RequestFilter, what does
FilterContext.getReqeustBuilder return? Does it make a copy of the
existing request? It should, or at least should have a
Request.Builder.builder(Request.Builder copy); method.
BTW, this interface is really really bizarre. These are the steps to
modify/add a header:
Builder b = filterContext.getRequestBuilder();
b.header("foo", "value");
filterContext.setRequest(b.build());
Would be much nicer to do:
ctx.getRequest().header("foo", value");
All these builder interfaces buy you very very little (except for
confusion and complexity). Its really hurting the spec, IMO.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com