| Summary: | [Net] Native bypass for "*.eclipse.org" does not work | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Wojciech Galanciak <wojciech.galanciak> | ||||||||||
| Component: | Team | Assignee: | Szymon Brandys <Szymon.Brandys> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | deux_d_tension, kazm, krzysztof.daniel, pawel.pogorzelski1, Szymon.Brandys | ||||||||||
| Version: | 3.6 | Flags: | Szymon.Brandys:
review+
|
||||||||||
| Target Milestone: | 3.7 M3 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Wojciech Galanciak
Created attachment 177306 [details]
proposed solution
It looks like there is a problem in native code for Windows. I have uploaded possible solution. It uses StringMatcher to check if host matches to any bypass pattern instead of using String.equals(). It does not solve problem in native code but avoids unnecessary native call to getProxyData() for bypasses with * (if host matches to pattern).
If there's a problem on Windows platform only the fix should affect only WindowsProxyProvider not AbstractProxyProvider I guess. Yes, you are right but in the other hand, the whole block:
String[] nonProxyHosts = getNonProxiedHosts();
if (nonProxyHosts != null) {
String host = uri.getHost();
for (int npIndex = 0; npIndex < nonProxyHosts.length; npIndex++) {
if (host.equals(nonProxyHosts[npIndex])) {
return new IProxyData[0];
}
}
}
is unnecessary, at least for Windows, cause Windows's provider for method getProxyData checks also system bypasses.
(In reply to comment #3) > is unnecessary, at least for Windows, cause Windows's provider for method > getProxyData checks also system bypasses. This is not completely true. It seems that it respects bypasses like dev.eclipse.*, but ignores *.eclipse.org. Wojtek told me that tools like IE respect both forms so I assume both are correct. Thus, if it is a Win problem, we should check bypasses on our side. Created attachment 178943 [details] patch only for Windows Here is a patch which fixes the problem only on Windows side. Anyway, I will investigate the problem mentioned in comment 3 and open a new bug if necessary. Created attachment 178955 [details]
improved patch for Windows
Patch with StringMatcher to support e.g. www.*.mypage.com
The latest patch looks good. Wojtek, please make sure that the patch does not introduce any regression and I will commit it at the beginning of M3. Created attachment 179035 [details]
patch for Windows + updated test
There is no regression problems. Additionally, I have extended bypass test for Windows with some new patterns.
I already approved the previous patch, if you want me to review the latest one you should reset the review flag. Checked in to HEAD. This bug is targeted for 3.7 M3. Is it planned to include it in an update version for 3.6 ? Or is there a way to include the patch to an existing v3.6 installation ? |