-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Reason: 'HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)'. #165
Comments
I can also reproduce on 0.5.10 (stream, sync). What version are you running? I was getting this error too the other day with stream=True, sync, 0.5.10b5 on an internal resource. I couldn't repro on any other site so assumed it was a server issue. 🤔 |
The url does not work in my browser, too. So I guess it's a server error. This error(http/2 stream 0) has been reported many times ever since curl_cffi was published, but I stil can not find a reproducible way to trigger it. Given that the majority users are behind proxies, the situation is even more difficult to deal with. I'm even not sure it's a bug introduced in libcurl, curl-impersonate or curl_cffi, or it's just a server error. Depending on your context, here are some general suggestions for future comers:
@coletdjnz if you can still reproduce this, please continue to comment. |
@yifeikong TKS for suggestion Yup, this websit is protected with Akamai. It works fine on my browser(http2, response with a redirect) and postman(http1.1, response a 400 bad requests page). when I tried it with curl_cffi in http/1.1 mode, the requests time out, acting like the python requests module. So I guess the libcurl based on openssl is blocked by this website. I see the google's boringssl is in the dependency of curl , so I wonderd if I replace the libcurl.dll with a new one based on boringssl is feasible. |
Akamai uses http2 fingerprints to detect browsers. This value was not changed for many chrome versions until 117, which curl_cffi does not support by now. It should be resolved by #163 BoringSSL was compiled staticlly into the .so file, and it's not related to http2 fingerprints. |
@airplane03 Your test method is wrong. The URL you mentioned requires cookies and headers to access. Of course, your browser can succeed if it has complete headers and cookies, but your test code does not have these. |
That dosn't mater, the curl_cffi with impersonate takes headers itself, For cookies, the anonymous browser and postman do not have cookies either |
I don’t know how you tested it. If I open this address directly in an incognito browser, I will be unable to access it. However, if I visit the homepage first and then visit the address you provided, I can access it. When I complete the browser Copy the headers and send the request to the address you provided, and the request library will run normally. |
Tks, what an idiot i am, I got the response after taking a header and changing my IP, |
It seems like a libcurl Error or a server Error
To Reproduce
Expected behavior
The text was updated successfully, but these errors were encountered: