]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/domain/DomainPinglogForm.java
upd: enforce a more strict Form call pattern.
[gigi.git] / src / org / cacert / gigi / pages / account / domain / DomainPinglogForm.java
index d2e8306675c36b41098aaa1c9753f5e8f26dd636..54209b20f34784894ee4b09e539d8daaa9b94e40 100644 (file)
@@ -28,10 +28,10 @@ public class DomainPinglogForm extends Form {
     }
 
     @Override
-    public boolean submit(HttpServletRequest req) throws GigiApiException {
+    public SubmissionResult submit(HttpServletRequest req) throws GigiApiException {
         CertificateOwner u = LoginPage.getAuthorizationContext(req).getTarget();
 
-        int i = Integer.parseInt(req.getPathInfo().substring(DomainOverview.PATH.length()));
+        int i = Integer.parseInt(req.getPathInfo().substring(DomainOverview.PATH.length() + 1));
         Domain d = Domain.getById(i);
         if (u.getId() != d.getOwner().getId()) {
             throw new GigiApiException("Error, owner mismatch.");
@@ -42,7 +42,7 @@ public class DomainPinglogForm extends Form {
             throw new GigiApiException("Error, target mismatch.");
         }
         dpc.requestReping();
-        return true;
+        return new RedirectResult(req.getPathInfo());
     }
 
     @Override