{
if (!readingChunks) {
request = (HttpRequest) e.getMessage();
ctx.sendUpstream(e);
QueryStringDecoder queryStringDecoder = new QueryStringDecoder(request.getUri());
String queryPath = queryStringDecoder.getPath();
int slashPos = queryPath.indexOf('/', 1);
if (slashPos < 0)
{
slashPos = queryPath.length();
}
String cmdName = queryPath.substring(1, slashPos);
ServerContainer.RuntimeConfig config = _serverContainer.getContainerRuntimeConfigMgr()
.getReadOnlyConfig();
if (LOG.isDebugEnabled())
{
LOG.debug("Got command: " + cmdName);
}
dbusRequest = new DatabusRequest(cmdName, request.getMethod(), e.getRemoteAddress(),
config);
if (LOG.isDebugEnabled())
{
LOG.debug("Starting processing command [" + dbusRequest.getId() + "] " +
dbusRequest.getName() );
}
Properties requestProps = dbusRequest.getParams();
if (slashPos < queryPath.length())
{
requestProps.put(DatabusRequest.PATH_PARAM_NAME, queryPath.substring(slashPos + 1));
}
for (Map.Entry<String, String> h: request.getHeaders()) {
handleHttpHeader(h);
}
Map<String, List<String>> params = queryStringDecoder.getParameters();
if (!params.isEmpty())
{
for (Entry<String, List<String>> p: params.entrySet())
{
String key = p.getKey();