mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 07:24:41 +00:00
Fixes from trial guide testing
* defaults.xml
remove error-causing redundant BdbCookieStorage declaration
* TextUtils.java
exception- and deprecation-free UTF8 URL escaping
* CrawlJob.java, JobResource.java
ensure job log shows INFO-level items
better handle job directories with spaces in them
This commit is contained in:
1 parent
02b5ca5f1d
commit
3862c361a4
4 files changed
+42
-6
No files matched your search
@@ -53,6 +53,7 @@ import org.archive.spring.ConfigPath;
|
||||
import org.archive.spring.ConfigPathConfigurer;
|
||||
import org.archive.spring.PathSharingContext;
|
||||
import org.archive.util.ArchiveUtils;
|
||||
import org.archive.util.TextUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
@@ -126,6 +127,7 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener{
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
jobLogger.setLevel(Level.INFO);
|
||||
}
|
||||
return jobLogger;
|
||||
}
|
||||
@@ -188,7 +190,7 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener{
|
||||
if(isRunning()) {
|
||||
pw.println("ACTIVE; "+getCrawlController().getState()+":");
|
||||
}
|
||||
pw.println("<a href='"+uriPrefix+getShortName()+"'>"+getShortName()+"</a>");
|
||||
pw.println("<a href='"+uriPrefix+TextUtils.urlEscape(getShortName())+"'>"+getShortName()+"</a>");
|
||||
if(isProfile()) {
|
||||
pw.println("(profile)");
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.archive.crawler.reporting.StatisticsTracker;
|
||||
import org.archive.spring.ConfigPath;
|
||||
import org.archive.util.ArchiveUtils;
|
||||
import org.archive.util.FileUtils;
|
||||
import org.archive.util.TextUtils;
|
||||
import org.restlet.Context;
|
||||
import org.restlet.data.CharacterSet;
|
||||
import org.restlet.data.Form;
|
||||
@@ -65,7 +66,7 @@ public class JobResource extends Resource {
|
||||
super(ctx, req, res);
|
||||
setModifiable(true);
|
||||
getVariants().add(new Variant(MediaType.TEXT_HTML));
|
||||
cj = getEngine().getJob((String)req.getAttributes().get("job"));
|
||||
cj = getEngine().getJob(TextUtils.urlUnescape((String)req.getAttributes().get("job")));
|
||||
if(cj==null) {
|
||||
throw new ResourceException(404);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user