mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix typo.
This commit is contained in:
parent
7a99648b00
commit
9ba14c6492
@ -14,7 +14,7 @@ func HttpGetBytes(url string) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
req.Header["User-Agent"] = []string{"QQ/8.2.0.1296 CFNetwork/1126"}
|
||||
req.Header["Met-Type"] = []string{"Wifi"}
|
||||
req.Header["Net-Type"] = []string{"Wifi"}
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -27,6 +27,7 @@ func HttpGetBytes(url string) ([]byte, error) {
|
||||
if strings.Contains(resp.Header.Get("Content-Encoding"), "gzip") {
|
||||
buffer := bytes.NewBuffer(body)
|
||||
r, _ := gzip.NewReader(buffer)
|
||||
defer r.Close()
|
||||
unCom, err := ioutil.ReadAll(r)
|
||||
return unCom, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user