mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 07:24:41 +00:00
fix for [HER-1729] add (deprecated) style code from Engine class to Flash class
* Heritrix.java added CLAP protocol to access representations via classloader * EngineApplication.java added staticDir resource to serve static files under "/engine/static" also added org.archive.crawler.restlet package to hold static files * EngineResource.java added <link> to static CSS resource * Engine.css style for flashACK/NACK/ADVISORY divs
This commit is contained in:
1 parent
b9ab0b296d
commit
5abacafd43
4 files changed
+23
No files matched your search
@@ -327,6 +327,7 @@ public class Heritrix {
|
||||
}
|
||||
}
|
||||
component.getClients().add(Protocol.FILE);
|
||||
component.getClients().add(Protocol.CLAP);
|
||||
Guard guard = new RateLimitGuard(null,
|
||||
ChallengeScheme.HTTP_DIGEST, "Authentication Required");
|
||||
guard.getSecrets().put(authLogin, authPassword.toCharArray());
|
||||
|
||||
@@ -111,6 +111,11 @@ public class EngineApplication extends Application {
|
||||
router.attach("/engine/job/{job}/beans/{beanPath}",BeanBrowseResource.class);
|
||||
router.attach("/engine/job/{job}/script",ScriptResource.class);
|
||||
|
||||
// static files (won't serve directory, but will serve files in it)
|
||||
String resource = "clap://class/org/archive/crawler/restlet";
|
||||
Directory staticDir = new Directory(getContext(),resource);
|
||||
router.attach("/engine/static/",staticDir);
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@ public class EngineResource extends BaseResource {
|
||||
PrintWriter pw = new PrintWriter(writer);
|
||||
pw.println("<head><title>"+engineTitle+"</title>");
|
||||
pw.println("<base href='"+baseRef+"'/>");
|
||||
pw.println("<link rel=\"stylesheet\" type=\"text/css\" href=\"static/Engine.css\"");
|
||||
pw.println("</head><body>");
|
||||
pw.println("<h1>"+engineTitle+"</h1>");
|
||||
|
||||
|
||||
Reference in new issue
Block a user