Add the ingest param to the context only if present

This commit is contained in:
javanna 2015-11-02 17:29:39 +01:00 committed by Luca Cavanna
parent 376c739fe6
commit 14e09ad20c

View File

@ -34,7 +34,9 @@ public class IngestRestFilter extends RestFilter {
@Override
public void process(RestRequest request, RestChannel channel, RestFilterChain filterChain) throws Exception {
request.putInContext(INGEST_PARAM_CONTEXT_KEY, request.param(INGEST_PARAM));
if (request.hasParam(INGEST_PARAM)) {
request.putInContext(INGEST_PARAM_CONTEXT_KEY, request.param(INGEST_PARAM));
}
filterChain.continueProcessing(request, channel);
}
}