when using the Jetty httpserver, is there a way to:
- Turn on http compression
yes if using a web.xml you can do it like in [1] or you can extend the embedded Jetty version in BaseXHTTP.java:
// Add GzipFilter filter
FilterHolder filterHolder = new FilterHolder(GzipFilter.class);
// filterHolder.setInitParameter("mimeTypes", "text/html,text/plain,text/xml,application/xhtml+xml,application/xml");
jcontext.addFilter(filterHolder, "/*", org.mortbay.jetty.Handler.DEFAULT);
This should work, but when using the server without a user/pw pair a LoginException will be thrown and a server error will be generated for the filter (probably some side effects...?).
- Requires the connection to take place over SSL (https only)
I didn't work with SSL and Jetty but maybe [2] helps you little.
Maybe other BaseX users have more Jetty SSL experience?
Regards
Lukas