}
public void run() {
if (client.isClosed()) return;
ThreadLocalMap.clearAll();
HttpRequest requestFromBrowser = null;
try {
requestFromBrowser = getRequestFromBrowser();
String uri = requestFromBrowser.uri();
logger.finest(uri);
if (uri != null) {
int _s_ = uri.indexOf("/_s_/");
int q = uri.indexOf("?");
if (_s_ != -1 && (q == -1 || (q > _s_))) {
processLocally(uri, requestFromBrowser);
} else {
if (isHostTheProxy(requestFromBrowser.host()) && requestFromBrowser.port() == Configuration.getPort()) {
processLocally(uri, requestFromBrowser);
} else if (uri.indexOf("favicon.ico") != -1) {
sendResponseToBrowser(new HttpFileResponse(Configuration.getHtdocsRoot() + "spr/favicon.ico"));
} else {
processAsProxy(requestFromBrowser);