Wednesday, January 10, 2007

Be careful when you are specifying hosts in defaultProxy/bypasslist

In our company all http traffic comes through squid. It is well known that squid has own opinion what is right and what is wrong in http. One good example is that all requests, originated from squid has “HTTP1.0” in header even if originally it was 1.1 Also squid hates DIME, so if you want to use external web-service that utilize DIME, you have to bypass squid. .NET Framework has quite good facilities in specifying proxy settings for the application. In fact when you are specifying hosts in <bypasslist>, you can use regular expressions. I was really surprised when once it doesn’t work in my application. I spent a couple of hours trying to track down what is wrong with the program, and finally discovered that my DIME requests was not bypassing proxy as intended. It appears that I was using ip address in <bypasslist> and domain name in the url of web service. So when .NET framework is trying to much them, it does not perform dns-lookup. Be aware of this!

No comments: