This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Sometimes $root/xml/api produces absolute URLs (e.g. for jobs) that look quite different from $root itself; sometimes these URLs do not work at all. The URL base can be configured for the Mailer task, otherwise defaulting to what the servlet container claims. (A recent Hudson release fixed a bug in the priority here.) If the admin did not configure a base URL for Mailer, the container may well have it wrong; even if they did, the URL might be incorrect (or out of date) - it is quite possible that no one would notice if they had hitherto just been using the web UI. Currently the IDE assumes that the XML API URLs are valid and accepts them uncritically, which has led to a number of bug reports that had to be solved on the user side. Options include: 1. As now, simply trust that URLs reported from the XML API are valid and ask Hudson admins to do a better job. 2. #1 but when adding a server check whether these URLs seem to use a different base than the URL the user passed in, and display a warning to the user if so. 3. Ignore URLs in the XML API and reconstruct them from the user-specified base URL, taking care to escape metachars in job names and so on. Kohsuke further suggested 4. Ignore the protocol, host, and port from the XML API URLs but keep their paths. This I think will not work in cases where pattern-based URL redirections employ path translations.
Just a minor factual correction. Until 1.307, Hudson has always consulted the servlet API for absolutization, instead of relying on the user configured value (see http://www.netbeans.org/issues/show_bug.cgi?id=165067). This bug was fixed in 1.307 to put the priority on the user configured value first, and only when it's not available it falls back to the value given by the servlet API.
#3a: It should be possible to look in $root/api/xml for http://junk.here/and/here/job/%C2%A1Viva%20Hudson%21/ and create $root/job/%C2%A1Viva%20Hudson%21/ by extracting the last two path components - that will make the IDE code not need to do its own escaping.
Issue #165067 claims the fix is in 1.306, but whichever it is the original description ("a recent Hudson release fixed...") is about right.
Test case: add "http://hudson.sfbay.sun.com/", select a job name, and Open in Browser. Should open to .sun.com address, not just http://hudson.sfbay/job/whatever/ as before. cdev #c1bf664e1246
Integrated into 'main-golden', will be available in build *200905230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c1bf664e1246 User: Jesse Glick <jglick@netbeans.org> Log: #165735: retain the same base URL as the user originally specified, picking up only suffix from api/xml.