Hi.
I am experimenting with the Jersey 2.7 client-side
ClientRequestFilter, and have the following code:
public void filter(ClientRequestContext requestContext) throws IOException {
String authorizationHeader =
requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);
if (!StringUtils.isEmpty(authorizationHeader)) {
requestContext.abortWith(Response.status(Response.Status.BAD_REQUEST).entity("Client
filter reserves the right to set Authorization header").build());
}
...
}
I find that if the requestContext.abortWith() method is called
processing does not actually stop, but continues past the
if-statement. This is contrary to what the documentation says here:
https://jersey.java.net/documentation/latest/user-guide.html#d0e8176
Would someone be kind enough to suggest what I might be doing wrong?
Thank you.
--
Mark