Thanks Eric,
I have tested it on 2 browsers (IE and FF), request/response header are given below. Authentication is missing in both request headers.
(I have also attached the code file)
IE [Request Header]GET / HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
IE [Response Header]
HTTP/1.0 407 Proxy Authentication Required
Date: Tue, 10 Jul 2012 07:50:07 GMT
Content-Type: text/html
Content-Length: 1336
Expires: Tue, 10 Jul 2012 07:50:07 GMT
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Basic realm="RotateiP Proxy Server"
FF [Request Header]User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Proxy-Connection: keep-alive
FF [Response Header]
HTTP/1.0 407 Proxy Authentication Required
Date: Tue, 10 Jul 2012 07:51:04 GMT
Content-Type: text/html
Content-Length: 1336
Expires: Tue, 10 Jul 2012 07:51:04 GMT
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Basic realm="RotateiP Proxy Server"