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.
Summary: | "No Proxy Hosts" not regarded | ||
---|---|---|---|
Product: | platform | Reporter: | Tomas Stupka <tstupka> |
Component: | Options&Settings | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, elishae, rbalada |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Tomas Stupka
2010-06-07 15:32:08 UTC
Thanks for a hint, I'll look on. Raising the priority as P2. This bug disables* Netbeans from talking to intranet sites, which are not served by proxy. (So, IMHO, this is a candidate for P2) One Available Workaround is : to mention the 'exact' host name of the target host in the non-proxy pattern. When there is no '*' in the pattern, this bug would not appear. elishae, your hint breaks a unit test (located in <netbeans-sources>/o.n.core/test/unit/src/org/netbeans/core/DontUseProxyTest.java). Could you look at the test and suggest your test-case for that test? That test fails (after your hint was applied) because www.dummynetbeans.org is regarded as non-proxy host in the case of pattern *.netbeans.org is for non-proxy hosts. Thank you Ah.. got the issue: When * is the first character, start is empty string. When * is the last character, end is empty string. earlier code was working for www.dummynetbeans.org because the end did not match, whereas start was always matching.. Instead, the logic should be updated to compare start only when * is not first character. and compare end only when * is not last chararcter As said earlier, Replace line 279 with below code. And it should satisfy all the test cases. Code: //Compare left of * if and only if * is not first character in token final boolean compareStart = start > 0; //Compare right of * if and only if * is not the last character in token final boolean compareEnd = star < token.length(); dontUseProxy = (compareStart && host.startsWith(start)) || (compareEnd && host.endsWith(end)); oops, typo: fix the code as .. boolean compareStart = star > 0; // not first character boolean compareEnd = star < (token.length() - 1); // not last character dontUseProxy = (compareStart && host.startsWith(start)) || (compareEnd && host.endsWith(end)); Thank you for revisited hint, it works now. Please, verify if it works correctly once it will be part of Dev build of NetBeans in a few days. Thanks core-main/rev/c226d46ee98b Integrated into 'main-golden', will be available in build *201006110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c226d46ee98b User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #187278: "No Proxy Hosts" not regarded Please verify bugfix for this bug, so it can be included in release691 repository. Thanks, -R verified Transplanted into release691 #d82b0fdff64e |