Repository navigation
Fix ipv6_test to support non-UTF-8 response from ipv6.google.com - #62
absolutely-vivid wants to merge 1 commit into
Conversation
|
Gleam strings are unicode strings and unicode bodies are expected to be UTF8 encoded, so I don't understand the change here. Could you expand on what behaviour you were seeing? |
|
Hmm, that makes sense. I re-ran the failing test, and this is the output I think what's actually happening is that ipv6.google.com is returning non-unicode data, and I misinterpreted the I'll edit the issue and change the commit message. |
Google's homepage returns non-utf8-encoded data, which was making the test fail due to the use of httpc.send instead of httpc.send_bits.
0a978b2 to
607faf7
Compare
|
Could it be something specific to your network? The HTML returned has says it is UTF8 with if curl -fsS https://ipv6.google.com | iconv -f UTF-8 -t UTF-8 >/dev/null; then
echo valid
else
echo not valid
fi
# valid |
|
I wonder if something is causing compressed data to be returned. I wouldn't expect that to be network-dependent. FWIW, I see only valid UTF-8 data from a curl on my network/machine. |
|
That's all really interesting! I did some digging and found some fun results.
All I can think is that different google servers return slightly different responses. All that tracks with the weird network things google seems to love 馃槄 |
|
@jtdowney I was imagining a corporate proxy returning a different page :) I think it would be good to replace these external services with ones run locally, to give us full control. |
|
Since it is over TLS, it would have to be an SSL-busting proxy, but they are certainly a thing, just somewhat rarer. My thinking was that Google was doing something different if they thought the end device was a mobile phone because it was on an IPv6 native mobile network. Google works in mysterious ways. I think with #64, #57 can be updated to really take advantage of local services, and the external services could be moved to an integration suite or just dropped. |
Google's homepage returns utf8-encoded data, which was making the test fail due to the use of httpc.send instead of httpc.send_bits.Google's homepage returns non-utf8-encoded data, which was making the test fail due to the use of
httpc.sendinstead ofhttpc.send_bits.