Microsoft Internet Explorer and autoconfig. Does it work?

From: Neil Murray <[email protected]>
Date: Fri, 06 Feb 1998 23:00:37 +1100

        I think I found a problem with Autoconfig and Microsoft Internet
Explorer 4.01. What I want is some other people to try these same tests and
see if they can be replicated.

        These tests were done in conjunction with David Yeung (dy@aone.com.au)
and I thank him for his assistance.

        The problem in short is that MSIE 4.01 on Win95 & NT4 when using a
dialup connection refetches the autoconfig script for each frame/image element
on a web page. When using a LAN connection it doesn't do it.

Software O/S Connection style Multiple reloads
-------- ---- ---------------- ----------------
MSIE 4.0 Win 3.11 LAN (ethernet) No
MSIE 4.0 Win 3.11 Dial-up 33.6kb No

MSIE 4.01 Win 95 LAN (ethernet) No
MSIE 4.01 Win 95 Dial-up 33.6kb Yes

MSIE 4.01 NT 4 LAN (ethernet) No
MSIE 4.01 NT 4 Dial-up 33.6kb Yes

        Note Netscape Communicator and MSIE 3.01 have no problems with multiple
reloads occurring. This was using stock Microsoft dialing software and a
just downloaded MSIE 4.01.

        At the end of this message is a perl script that logs each
use of itself. The log has the time (in unix ctime format), what the program
name is (I had several scripts using the same log file), the client name and IP address (changed to protect the guilty), the actual preferences line that is
sent to the client and what the client's browser reports itself as.

        At Access One we have geographically dispersed proxies, so when a
customer dials into one of our POPs the full version of the perl script
uses the clients IP address to construct the best order for using the proxies.
It was while testing this I noticed the anomaly with MSIE. This is also
why the log reports what it does.

        Of interest MSIE 3.01 reports itself when fetching the autoconfig file
as "Auto-Proxy Downloader".

        Below will give an idea of what the log looks like;

MSIE 4.01 on Win95 - LAN connection. Loads it once.

886733039 [/cgi-bin/setproxy3.pjs] host "dy-pc1.a.thing" (xxx.xxx.yyy.yyy) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"

MSIE 4.01 on Win95 - Dialup. Loads it multiple times/per page.
                                        (It appears to be once/frame).

886733219 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"
886733221 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"
886733223 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"
886733225 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"
886733229 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"
886733234 [/cgi-bin/setproxy3.pjs] host "d48-3.a.thing" (xxx.xxx.xxx.xxx) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.01; Win32)" accept "*/*"

MSIE 4.01 on Win.311 - Dialup Loads it once

886733901 [/cgi-bin/setproxy3.pjs] host "d48-2.a.thing" (xxx.xxx.zzz.zzz) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.0; Windows 3.1)" accept "*/*, q=0.300, application/x-x509-ca-cert, multipart/mixed, multipart/x-mixed-replace, text/plain, text/html"

MSIE 4.01 on Win.311 - Lan Loads it once

886734113 [/cgi-bin/setproxy3.pjs] host "d48-2.a.thing" (xxx.xxx.zzz.zzz) method "" preferences "PROXY a.proxy.thing:80; PROXY b.proxy.thing:80; DIRECT" agent "Mozilla/4.0 (compatible; MSIE 4.0; Windows 3.1)" accept "*/*, q=0.300, application/x-x509-ca-cert, multipart/mixed, multipart/x-mixed-replace, text/plain, text/html"

        Tried searching through the registry to see if there was something that controlled the behaviour. Found the following;

        HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet

settings

        AutoConfigReloadDelayMins

It would also appear in HKEY_USERS.

        This controls how often to reload the autoconfig script. We tried
setting this to 1 minute to see what would happen. When we did so MSIE 4.01
fetched the autoconfig script every minute whether you used it or not.
Putting 1800 in the setting had no effect on the continual refetchs when set
for dialup connection. This is a useful setting as MSIE when it decides a
proxy is not available never goes back and retries to see if the proxy is back
up. So for setting AutoConfigReloadDelayMins to something like 120 (2 hours)
will allow the script to be refetched and the various proxies specified to be
retried.

        You will need the CGI.pm module so use this code. CSPAN will have it.
or try http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html.
----------------------------------------------------------------------------
#!/usr/local/bin/perl5
#
# script to dynamically set proxy via netscape's/msie automatic proxy
# configuration
#
# also serves a secondary use of telling us what
# browsers users are using, and other useless facts
#

# DEFINES
$logfile = "/localdata/proxyconf.log";

#
# preferences
#
$near = "a.proxy.thing:80";
$far = "b.proxy.thing:80";

$preferences = "PROXY $near; PROXY $far; DIRECT";

use CGI;
$query = new CGI;

$remote_addr = $query->remote_addr();
$remote_host = $query->remote_host();
$remote_ident = $query->remote_ident();
$user_agent = $query->user_agent();
$referer = $query->referer();

$msieflag = 0;
$_ = $user_agent;
if (/^(.*)MSIE(.*)$/ || /^Auto-Proxy Downloader/) {
        $msieflag = 1;
}

#
# output to browser
#
if ($msieflag) {
        # MSIE 3.02 & better.
        print "Content-type: application/x-javascript-config\n\n";
} else {
        # Netscape (all versions)
        print "Content-type: application/x-ns-proxy-autoconfig\n\n";
}
print "function FindProxyForURL(url, host)\n";
print "{\n";
print " return \"$preferences\";\n";
print "}\n";

#
# store details of what we did ..
#
if (open(F,">>$logfile") != 0) {
        printf F "%lu [%s] host \"%s\" (%s) method \"%s\" preferences \"%s\" agent \"%s\" accept \"%s\"\n",
                time,
                $0,
                $remote_host,
                $remote_addr,
                $method,
                $preferences,
                $user_agent,
                $ENV{"HTTP_ACCEPT"};
                
        close(F);
}

exit 0;
----------------------------------------------------------------------------

        If you get different result than I do please email me directly.
If you know how to make MSIE work properly then DEFINITELY email with the
details please.

PS: Does anyone had the email address for submitting bug reports to Microsoft,
        I tried searching the www.microsoft.com site for an email address but
        their search engine kept erroring on me.

-- 
Neil Murray                              Email:  Neil.Murray@aone.com.au
Access One Pty. Ltd.                     http://www.aone.net.au/
41 Malcolm Rd., Braeside                 Phone:  +61 3 9239 1444
Victoria, Australia  3195                Fax:    +61 3 9587 3954
Received on Fri Feb 06 1998 - 04:19:41 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:48 MST