New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http.TestClient cannot parse OpenDNS http responses #544
Labels
Comments
It looks like it's trying to parse the http body (the robots.txt) as if it were a number, which suggests that the http header reading code is broken. But it's working here. Is it reproducible on your system? Owner changed to r...@golang.org. |
It's reproducible. I also checked it on another system and everything works fine there (both with 41d37c2440fb tip right now). I also compared the response headers on both systems for http://www.google.com/robots.txt, they are different. And after some more investigation I can now reproduce the error on my other machine by changing the DNS server. The working DNS server is the one from my ISP (T-Online). Not working is 208.67.222.222 from OpenDNS. I've copied the non-working header below: HTTP/1.0 200 OK Content-Type: text/plain Last-Modified: Tue, 15 Dec 2009 22:15:29 GMT Set-Cookie: PREF=ID=14d10338add15be8:TM=1263926773:LM=1263926773:S=opq1ThF-KAf2KMDP; expires=Thu, 1$ Date: Tue, 19 Jan 2010 18:46:13 GMT Server: gws Cache-Control: private, x-gzip-ok="" X-XSS-Protection: 0 Expires: Tue, 19 Jan 2010 18:46:13 GMT X-Cache: MISS from . Via: 1.0 .:80 (squid) Connection: close And this is what it probably should look like (and what works): HTTP/1.0 200 OK Content-Type: text/plain Last-Modified: Tue, 15 Dec 2009 22:15:29 GMT Set-Cookie: PREF=ID=9af674a66d32eab7:TM=1263926792:LM=1263926792:S=WtiYMKLI7a7XELq5; expires=Thu, 1$ Date: Tue, 19 Jan 2010 18:46:32 GMT Server: gws Cache-Control: private, x-gzip-ok="" X-XSS-Protection: 0 Expires: Tue, 19 Jan 2010 18:46:32 GMT |
I have reproduced the problem by breaking net's dns implementation to always return the IP address of the server that OpenDNS pretends is www.google.com. Even though OpenDNS is lying to your computer and directing you to the wrong server, Go should still be able to handle the reply. Thanks for reporting this. By the way, if you're avoiding your ISP's DNS server because it is too slow, might I suggest 8.8.8.8 and 8.8.4.4? ;-) http://code.google.com/speed/public-dns/docs/intro.html Status changed to Accepted. |
This issue was closed by revision 75c6dc9. Status changed to Fixed. Merged into issue #-. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by MauriceGilden:
The text was updated successfully, but these errors were encountered: