One other thing that might break it is trailing whitespace.  We had a similar 
problem with CMAK routing tables that drove us nuts for several weeks.

--
There are 10 kinds of people in the world...
         those who understand binary and those who don't.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Ben Scott
Sent: Thursday, April 2, 2015 1:52 PM
To: [email protected]
Subject: Re: [NTSysADM] RE: Java and proxy.pac

On Wed, Apr 1, 2015 at 12:27 PM, Miller Bonnie L.
<[email protected]> wrote:
> Once our Server applications analyst ... has the rights to receipt 
> printing in our SIS ...

  I don't know what that means.  :-)

> I did see something about the space chars and tried going through the 
> file to make sure there weren't any tabs, etc ... Notepad++ ...

  You can do a search for \t with the Search Mode set to Extended to find all 
tabs.

  But our PAC script is full of tabs and works with Java.

  An unprintable but weird character (like a CTRL+G or something) might cause 
Java to puke, though.  Try telling Notepad++ to "Show all characters" and look 
for anything that's not space (middle dot), tab (arrow), or end-of-line.  Also 
make sure the end-of-line is consistent (if using CR+LF, it should be CR+LF 
everywhere).

> On the MIME types, is there something that needs to be added/defined 
> for the .pac file type?

  The web server should return the PAC script with a Content-Type of 
"application/x-ns-proxy-autoconfig".  This is typically accomplished by telling 
the server that any file ending in ".pac" has that type.  I don't know if 
recent versions of IIS define it that way out of the box.  In the past, I know 
you had to tell it manually.

  Some clients care about MIME types for the PAC script, others do not.  Java 
may care, so this is worth checking.

  You can see what your web server is doing with a decent Telnet or TCP client. 
 (Unfortunately bugs in the Microsoft Telnet client make it a bad choice for 
this.)  PuTTY works well in RAW mode, or use a *nix Telnet client if you have 
one.  Then connect to the web server on port 80, and type the following at the 
web server:

HEAD /path/to/proxy.pac HTTP/1.1
Host: web.server.name.example.com

  Make you press ENTER twice after the "Host" header.  You should get the HTTP 
headers back for the proxy script.  Look for "Content-Type".
If it's not "application/x-ns-proxy-autoconfig" you have a problem.

-- Ben


Reply via email to