Re: Re[2]: [Haskell-cafe] ANN: HTTPbis / HTTP-4000.x package available

On Sat, 2009-01-17 at 20:34 -1000, Tim Newsham wrote:
Speaking of proxies, I've been looking into how to find the right proxy to use on Windows systems. Turns out that to do it properly you need a JavaScript interpreter! Yes, really.
Uhh.. What!? That's not right.
I think you mean it should not be right! :-) Of course it's possible to specify a list of proxies in Windows and that info is kept in the registry. It's also common in corporate networks to use proxy auto-configuration. The client gets told the URL of the these (.pac) files and the client downloads it to work out what proxy to use. You'll notice a space to specify an auto-configuration URL (.pac file) in the proxy setting dialog of any web browser. Proxy auto-configuration files are JavaScript. It uses more or less the full JavaScript language (ECMA these days), though with a small subset of the standard library. Web browsers are ok because they've got a JavaScript interpreter. The MS WinHTTP library uses the Windows scripting host service. The open source pacparser C library links to the Mozilla SpiderMonkey JavaScript engine. Apparently we have Netscape to thank for this mess. Duncan

Duncan Coutts wrote:
Proxy auto-configuration files are JavaScript. It uses more or less the full JavaScript language (ECMA these days), though with a small subset of the standard library.
W T F So we want a tiny naive javascript interpreter, hopefully in pure Haskell. The dumbest interpreter than can parse and evaluate the language. An separate program that just translates .pac file to something declarative is sorely needed. -- Chris

Yeah, the .pac files are a major pain. :(
On Wed, Jan 21, 2009 at 3:32 PM, ChrisK
Duncan Coutts wrote:
Proxy auto-configuration files are JavaScript. It uses more or less the full JavaScript language (ECMA these days), though with a small subset of the standard library.
W T F
So we want a tiny naive javascript interpreter, hopefully in pure Haskell. The dumbest interpreter than can parse and evaluate the language.
An separate program that just translates .pac file to something declarative is sorely needed.
-- Chris
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
ChrisK
-
Duncan Coutts
-
Lennart Augustsson