resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
"No agentId found in url.");
resp.flushBuffer();
return;
}
Agent agent = null;
try {
agent = host.getAgent(agentId);
} catch (final Exception e) {
LOG.log(Level.WARNING, "Couldn't get agent:" + agentId, e);
}
if (agent == null) {
resp.sendError(HttpServletResponse.SC_NOT_FOUND,
"Agent not found at this host.");
resp.flushBuffer();
return;
}
if (agent.hasPrivate() && !handleSession(req, resp)) {
if (!resp.isCommitted()) {
resp.sendError(HttpServletResponse.SC_UNAUTHORIZED);
}
resp.flushBuffer();
return;