title: Google Geocode API from China IPv6
body: <p>When accessing geocode api from our servers in Shanghai, it connects to IPv6, but our provider doesn't support it and requests fails.</p>
  
  <p>However, when accessing from Europe or US, it connects to IPv4 only and works fine.</p>
  
  <p>Here is the output from Shanghai servers</p>
  
  <pre><code>curl -v -IL 'http://maps.googleapis.com/maps/api/geocode/json' 
  * About to connect() to maps.googleapis.com port 80 (#0)
  * Trying 74.125.128.95... Connection timed out
  * Trying 2404:6800:4005:c00::5f... Failed to connect to 2404:6800:4005:c00::5f: Network is unreachable
  * Success
  * couldn't connect to host
  * Closing connection #0
  curl: (7) Failed to connect to 2404:6800:4005:c00::5f: Network is unreachable
  </code></pre>
  
  <p>And this is the output from Europe:</p>
  
  <pre><code>curl -v -IL 'http://maps.googleapis.com/maps/api/geocode/json'
  * About to connect() to maps.googleapis.com port 80 (#0)
  * Trying 173.194.70.95... connected
  &gt; HEAD /maps/api/geocode/json HTTP/1.1
  &gt; User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
  &gt; Host: maps.googleapis.com
  &gt; Accept: */*
  &gt; 
  &lt; HTTP/1.1 200 OK
  HTTP/1.1 200 OK
  &lt; Content-Type: application/json; charset=UTF-8
  Content-Type: application/json; charset=UTF-8
  &lt; Date: Fri, 13 Jun 2014 11:50:43 GMT
  Date: Fri, 13 Jun 2014 11:50:43 GMT
  &lt; Expires: Sat, 14 Jun 2014 11:50:43 GMT
  Expires: Sat, 14 Jun 2014 11:50:43 GMT
  &lt; Cache-Control: public, max-age=86400
  Cache-Control: public, max-age=86400
  &lt; Vary: Accept-Language
  Vary: Accept-Language
  &lt; Access-Control-Allow-Origin: *
  Access-Control-Allow-Origin: *
  &lt; Server: mafe
  Server: mafe
  &lt; X-XSS-Protection: 1; mode=block
  X-XSS-Protection: 1; mode=block
  &lt; X-Frame-Options: SAMEORIGIN
  X-Frame-Options: SAMEORIGIN
  &lt; Alternate-Protocol: 80:quic
  Alternate-Protocol: 80:quic
  &lt; Transfer-Encoding: chunked
  Transfer-Encoding: chunked
  
  &lt; 
  * Connection #0 to host maps.googleapis.com left intact
  * Closing connection #0
  </code></pre>