X-Git-Url: http://dolda2000.com/gitweb/?p=jsvc.git;a=blobdiff_plain;f=src%2Fdolda%2Fjsvc%2Futil%2FRestarts.java;h=06ab68260d9468bf13b27007137d258074c9b301;hp=d4aab70d2a9e819324a72b7e3c3c165bfce57f83;hb=4b8346e1aad3c58196f8d4dadf9da6726f66f5f4;hpb=d7bc1a7a5f8c82911f7504903cfbfd956b216022 diff --git a/src/dolda/jsvc/util/Restarts.java b/src/dolda/jsvc/util/Restarts.java index d4aab70..06ab682 100644 --- a/src/dolda/jsvc/util/Restarts.java +++ b/src/dolda/jsvc/util/Restarts.java @@ -34,11 +34,10 @@ public class Restarts { public void respond(Request req) { req.status(303); URL url; - String rel = req.ctx().rootpath() + "/" + Misc.stripslashes(path, true, false); try { - url = new URL(req.url(), rel); + url = new URL(req.rooturl(), Misc.stripslashes(path, true, false)); } catch(MalformedURLException e) { - throw(new RuntimeException("Bad relative URL: + " + rel, e)); + throw(new RuntimeException("Bad relative URL: + " + path, e)); } req.outheaders().put("Location", url.toString()); }