req = new HttpRequest( sv );
req.process( new BufferedInputStream(client.getInputStream()) );
Locale locale = localeFactory.getLocale( req.getPreferredLangCode() );
final WebAction action = dispatcher.getAction( req );
action.setRequest( req );
action.setLocale( locale );
if ( action.requiresSession() ) {
final Session session = new Session( db, req, null );
user = session.getCurrentUser();
}
action.setUser( user );
res = new HttpResponse(
new BufferedOutputStream(client.getOutputStream()),
db, p, locale, user,
req.getHeader("Accept-Encoding").contains("gzip")
// @TODO fix safari gzip bug
&& !req.getHeader("User-Agent").contains("Safari")
);
action.setResponse( res );
process( action, user, req, locale, res );
}