http://defect.opensolaris.org/bz/show_bug.cgi?id=19221
--- Comment #7 from Vladimir Kotal <[email protected]> 2012-07-10 11:40:34 UTC --- (In reply to comment #5) > Tried to verify it by creating+modifying a > testdata/sources/bug19221/test:file.txt in a opengrok test repo. History/diffs > work as expected. > > The only problem encountered is IMHO a browser bug: seem to interpret this > relative path as an URI with schema 'test', even so there is no ':/'. Anyway, > that's easy to fix by just prefixing the link with a './' - browsers will > normalize the URL (checked for FF/Chrome/Safari), i.e. strip './' off in the > request... I did this in PageConfig.java: diff --git a/src/org/opensolaris/opengrok/web/PageConfig.java b/src/org/opensolaris/opengrok/web/PageConfig.java --- a/src/org/opensolaris/opengrok/web/PageConfig.java +++ b/src/org/opensolaris/opengrok/web/PageConfig.java @@ -155,6 +155,12 @@ data.rev = new String[2]; data.file = new String[2][]; data.param = new String[2]; + + /* + * Basically the request URL looks like this: + * http://$site/$webapp/diff/$resourceFile?r1=$fileA@$revA&r2=$fileB@$revB + * The code below extracts file path and revision from the URL. + */ for (int i = 1; i <= 2; i++) { String[] tmp = null; String p = req.getParameter("r" + i); @@ -163,6 +169,8 @@ } if (tmp != null && tmp.length == 2) { filepath[i - 1] = tmp[0]; + /* XXX */ + log.log(Level.WARNING, "filepath: " + i + " = " + filepath[i - 1]); data.rev[i - 1] = tmp[1]; } } and tried to display the diff for the above mentioned 'colon-test' Merucrial repository. In catalina.out log file I got this: Jul 10, 2012 1:38:07 PM org.opensolaris.opengrok.web.PageConfig getDiffData WARNING: filepath: 1 = /colon-test/foo%3Abar Jul 10, 2012 1:38:07 PM org.opensolaris.opengrok.web.PageConfig getDiffData WARNING: filepath: 2 = /colon-test/foo%3Abar So, the URL is certainly not fully decoded. -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ opengrok-dev mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opengrok-dev
