Charset charset = decoder.getCharset();
myWriter.setCharsetForNextMessage(charset);
IAuthorizationServerCallback authorizationCallback = myProtocol.getAuthorizationServerCallback();
if (authorizationCallback != null) {
boolean auth = authorizationCallback.authorize(decoder.getPath(), decoder.getUsername(), decoder.getPassword());
if (!auth) {
HTTPUtils.write401Unauthorized(myWriter.getOutputStream());
throw new LLPException("Authorization at URI[" + decoder.getPath() + "] failed for user[" + decoder.getUsername() + "]");
}
}