urlmon/tests: Fix protocol tests when proxy is configured

Ge van Geldorp ge at gse.nl
Mon Jan 19 10:26:13 CST 2009


Hi Jacek,

> From: Jacek Caban <jacek at codeweavers.com>
> Subject: Re: urlmon/tests: Fix protocol tests when proxy is configured
> 
> Ge van Geldorp wrote:
> > There is a large amount of proxy configurations possible on 
> > Windows (WPAD, proxy.pac, fixed proxy values), which might behave 
> > differently on a second run of the protocol test compared to the
> > first run. These configurations influence when/how
> > IInternetProtocolSink methods are called. For example,
> > with a standard, direct connection you'll get the following 
> > ReportProgress notifications during the https test:
> > BINDSTATUS_FINDINGRESOURCE
> > BINDSTATUS_CONNECTING
> > BINDSTATUS_SENDINGREQUEST
> > BINDSTATUS_ACCEPTRANGES
> > BINDSTATUS_MIMETYPEAVAILABLE
> > However, when you run the protocol test for the second time 
> > on a machine with a fixed proxy server configured, you'll only
> > get these notifications:
> > BINDSTATUS_SENDINGREQUEST
> > BINDSTATUS_ACCEPTRANGES
> > BINDSTATUS_MIMETYPEAVAILABLE
> >
> > When a proxy is used, the BINDSTATUS_FINDINGRESOURCE and
> > BINDSTATUS_CONNECTING notifications report the hostname/ip 
> > address of the proxy server, not the end destination.
> 
> I can't see this behavior in tests results, where do you see 
> them? Which IE version is it?

This started when investigated the failures reported here:
http://test.winehq.org/data/8b10dd2a8daed738527f92aa89104c8647e4535c/2003_gv
g-w2k3r2sesp2/urlmon:protocol.html. This is a Windows 2003 R2 Standard
Edition SP2 machine with IE6. The status 32 shown there is
BINDSTATUS_PROXYDETECTING. It turns out that on this particular machine
"Automatically detect settings" (aka WPAD) was activated. The full sequence
of of ReportProtress notifications for the https test was:

BINDSTATUS_FINDINGRESOURCE
BINDSTATUS_CONNECTING
BINDSTATUS_PROXYDETECTING
BINDSTATUS_CONNECTING
BINDSTATUS_SENDINGREQUEST
BINDSTATUS_ACCEPTRANGES
BINDSTATUS_MIMETYPEAVAILABLE

I then started experimenting on that machine with various proxy settings. I
found that this sequence happens on the first run with WPAD configured but
no wpad.mydomain.mytld available. On a second run it seems the info that no
wpad was available was cached, I got "standard" behavior. If I configured a
wpad.mydomain.mytld domain the sequence would also revert back to "standard"
on the first run (whether there was a wpad.dat file available from that host
or not didn't seem to matter, there just needs to be a wpad.mydomain.mytld
DNS entry). When a proxy was indeed configured via WPAD, the
BINDSTATUS_FINDINGRESOURCE and BINDSTATUS_CONNECTING notifications reported
the hostname/ip address of the proxy server.
Next I experimented with "Use automatic configuration script" (aka
proxy.pac). I found that in that case the "standard" notification sequence
was used, but still with the proxy server hostname/ip address.
Finally I set a manual proxy server. In that case, the first time I run the
test I get the "standard" sequence, but on the second (and later) runs I see
the very minimal sequence mentioned in my original post.
So most of the behavior was seen in one-off experimentation. If you want, I
can set up some machines to report some of the behaviors to test.winehq.org.

> Also, you have to make sure that each SET_EXPECT is followed by 
> CHECK_CALLED (or CLEAR_CALLED if you want to ignore that function was 
> not called).

Ok, thanks, I'll take care of that.

Ge.




More information about the wine-devel mailing list