alexreisner/geocoder — pull request #454 by thrillcall (2013-04-26 03:18:05+00:00)
Title: Bugfix to handle Content-Encoding 'gzip' responses from Geocoding API's.

Now requests gzip'ed responses by default for improved API performance.

````
Geocoder.config[:http_headers] = {"Accept-Encoding" => "gzip"}
````
This request behavior can be overridden with:

````
Geocoder.config[:http_headers] = nil
````
This fix is the result of an issue observed with Bing where it will
sometimes return the first response as:

````
"content-type"=>["application/json"]
````

with no content-encoding response header. However it will sometimes
return gzip body content on subsequent requests:

````
"content-type"=>["application/json"], "content-encoding"=>["gzip"]
````

with the body fully gzip encoded. Geocoder did not previously handle
gzip'ed responses.