mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 23:43:29 +00:00
Fixes from trial guide testing
* EngineApplication.java
better handle job directories with spaces in them
This commit is contained in:
1 parent
3862c361a4
commit
c2b82efb89
1 file changed
+5
-3
@@ -22,6 +22,7 @@ package org.archive.crawler.restlet;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.archive.crawler.framework.Engine;
|
||||
import org.archive.util.TextUtils;
|
||||
import org.restlet.Application;
|
||||
import org.restlet.Directory;
|
||||
import org.restlet.Redirector;
|
||||
@@ -70,9 +71,10 @@ public class EngineApplication extends Application {
|
||||
Reference determineRootRef(Request request) {
|
||||
try {
|
||||
return new Reference(
|
||||
EngineApplication.this.getEngine()
|
||||
.getJob((String)request.getAttributes().get("job"))
|
||||
.getJobDir().getCanonicalFile().toURI().toString());
|
||||
EngineApplication.this.getEngine()
|
||||
.getJob(TextUtils.urlUnescape(
|
||||
(String)request.getAttributes().get("job")))
|
||||
.getJobDir().getCanonicalFile().toURI().toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user