I configured LitteProxy as a reverse proxy and trying to implement a filter. When I send a HTTP GET , the clientToProxyRequest filter adapter is called twice. Once with DefaultHttpRequest as httpObject and the second time with LastHttpContent. It can be something to do with chunks ? How do I do this right ?
HttpProxyServerBootstrap bs = DefaultHttpProxyServer.bootstrap();
//reverse proxy
bs.withAllowRequestToOriginServer(true);
Filter is created as :
new HttpFiltersAdapter(originalRequest) {
@Override
public HttpResponse clientToProxyRequest(HttpObject httpObject) {
//doing filtering here..
return null;
}
}