Re: [squid-users] IE search from address bar + Squid

From: Muthukumar <kmuthu_gct@dont-contact.us>
Date: Fri, 11 Jun 2004 18:42:18 +0530

I recently had a user complain that when they would type a search term (like dell instead of www.dell.com) in their address bar that
squid would return an error page stating that it was an invalid URL instead of IE going to the MSN search page. Upon further
investigation I found that IE will only return the search page if the proxy server sends a 502 - bad gateway error, but not a 503 -
service unavailable error (the default squid behavior).

=====
[RE] Yes. It is not only for dell,if you type yahoo or hotmail ,it will try to resolve as http://hotmail/ or http://yahoo/ . It will
expect the keyword of .com in the end.
=====
To correct this I modified forward.c and changed the following:

err = errorCon(ERR_DNS_FAIL, HTTP_SERVICE_UNAVAILABLE);

to

err = errorCon(ERR_DNS_FAIL, HTTP_BAD_GATEWAY);

=====
[RE] Squid code understanding and changing to your requirement is a good one. But there is a option in squid.conf file called
append_domain. Use that option as

# It is used to resolve urls with out .com keyword
append_domain .com
[RE] Now it will try resolve for dell with the appeneded domain of .dom as http://dell.com append_domain option will resolve your
problem. It can be used for if you directly type the url as http://dell.com
=====

IE will now go to the search page if a user enters an invalid hostname in the URL (and has the search functionality enabled). I'm
not sure if this change will ever make it into the squid stable branch but it's worth noting that most commercial proxy servers
return a 502 error in this situation.

== ==
[RE] For Changing the codes on squid, you can very well subscribe on squid-dev@squid.org list (and / or) cc to hno@squid-cache.org
<Henrick Norstrom>
=====

Regards,
Muthukumar.

---
===============  It is a "Virus Free Mail" ===============
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 6/7/2004
Received on Fri Jun 11 2004 - 07:12:48 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT