#98 Bad links to ViewVC in commit logs

closed-fixed
nobody
8
2009-08-22
2009-05-16
No

The latest version (0.5.0) has broken the links to ViewVC for diffs. Note that the "Browse with ViewVC" link works fine, but any file links (for diffs) in commit logs are invalid. They are of the form:

http://statcvs.sourceforge.net/statcvs/http%3A%2F%2Fstatcvs.cvs.sourceforge.net%2Fstatcvs%2Fstatcvs%2Ftests-src%2Fnet%2Fsf%2Fstatcvs%2Finput%2FTestForCount.java%3Frev%3D1.1%26amp%3Bcontent-type%3Dtext%2Fvnd.viewcvs-markup

This is from your own site at:

http://statcvs.sourceforge.net/statcvs/dir_statcvs_tests-src_net_sf_statcvs_input.html

Discussion

  • David Multer

    David Multer - 2009-05-16
    • summary: Bad links to in commit logs --> Bad links to ViewVC in commit logs
     
  • David Multer

    David Multer - 2009-05-16
    • priority: 5 --> 8
     
  • David Multer

    David Multer - 2009-05-18

    I think I've figured out why this happens. The diff link is URL encoded in pages/CommitListFormatter.java. When the browser (Firefox, Safari, others) parses the URL, it doesn't see it as an absolute path and therefore prepends the site prefix to the URL. It's critical that an absolute path reference begins with "http://" and not "http%3A%2F%2F".

     
  • David Multer

    David Multer - 2009-05-18

    Note that you should also not encode the path separators (slashes) either. You need to URL encode the substrings only, never pass in a full path for URL encoding. I don't know if this problem happens elsewhere in the code.

     
  • David Multer

    David Multer - 2009-05-18

    The bug was introduced by a recent change to escapeUrl() in pages/HTML.java. Previous versions of this function did not encode the colon or forward slash characters. Introducing encoding of these characters broke encoding of any full path strings passed to the function such as in CommitListFormatter.java.

     
  • Benoit Xhenseval

    Fixed in 0.6.0 I believe

    Thanks for reporting it.

     
  • Benoit Xhenseval

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks