use of com.bradmcevoy.http.Handler in project v7files by thiloplanz.
the class MiltonServlet method init.
@Override
public void init(ServletConfig config) throws ServletException {
String endpoint = config.getInitParameter("webdav.endpoint");
Properties ep = Configuration.getEndpointProperties(endpoint);
dbName = ep.getProperty("mongo.db");
try {
endpointProperties.set(ep);
super.init(config);
} finally {
endpointProperties.remove();
}
// http://stackoverflow.com/questions/8380324/
httpManager.getHandlers().setEnableExpectContinue(false);
handlers: for (HttpExtension x : httpManager.getHandlers()) {
if (x instanceof Http11Protocol) {
Http11Protocol p = (Http11Protocol) x;
for (Handler h : x.getHandlers()) {
if (h instanceof com.bradmcevoy.http.http11.GetHandler) {
httpManager.addFilter(0, new GetHandler(new DefaultWebDavResponseHandler(new AuthenticationService()), p.getHandlerHelper()));
break handlers;
}
}
}
}
}
Aggregations