cmd/faucet: fix removal of Twitter zlib compression

This commit is contained in:
Péter Szilágyi 2017-12-21 14:14:24 +02:00
parent 5258785c81
commit 68651a2329
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D

View File

@ -21,7 +21,6 @@ package main
import ( import (
"bytes" "bytes"
"compress/zlib"
"context" "context"
"encoding/json" "encoding/json"
"errors" "errors"
@ -698,11 +697,7 @@ func authTwitter(url string) (string, string, common.Address, error) {
} }
defer res.Body.Close() defer res.Body.Close()
reader, err := zlib.NewReader(res.Body) body, err := ioutil.ReadAll(res.Body)
if err != nil {
return "", "", common.Address{}, err
}
body, err := ioutil.ReadAll(reader)
if err != nil { if err != nil {
return "", "", common.Address{}, err return "", "", common.Address{}, err
} }