imroc / req

Simple Go HTTP client with Black Magic
https://req.cool
MIT License
4.25k stars 347 forks source link

connection error: COMPRESSION_ERROR #275

Closed elpaxel closed 1 year ago

elpaxel commented 1 year ago

When I'm using "ImpersonateChrome" request fails with "connection error: COMPRESSION_ERROR". Only on this url: https://httpbingo.org/anything Without "ImpersonateChrome" request is working fine.

go 1.20 req 3.41.7

package main

import (
    "fmt"
    "log"

    "github.com/imroc/req/v3"
)

func main(){
    client := req.C().ImpersonateChrome()

    resp, err := client.R().Get("https://httpbingo.org/anything")

    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(resp.String())
}
elpaxel commented 1 year ago

ImpersonateChrome - COMPRESSION_ERROR ImpersonateFirefox - COMPRESSION_ERROR ImpersonateSafari - works

imroc commented 1 year ago

Nice catch! It's been fixed in the latest version, try it.

elpaxel commented 1 year ago

Yep. Now this url is working: https://httpbingo.org/anything But this url: https://9gag.com gives "connection error: FLOW_CONTROL_ERROR" But it is working fine in 3.41.7-3.41.8

imroc commented 1 year ago

That's wired, will take some time to deep dive.

imroc commented 1 year ago

@elpaxel FLOW_CONTROL_ERROR has been fixed in the latest version

elpaxel commented 1 year ago

Thank you. Now everything works.