-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Compatibility issues HTTP_PROXY returns HTTP/1.0 200 Connection established
#2053
Comments
Could you set a debug breakpoint at L207 and inspect the result of |
Sorry, I'm debugging this issue by just sending same content through PacketSender, which can be accquire from https://packetsender.com/. And getting response from my Proxy Server is like below ![]() |
curl works with my proxy , and I'm getting this verbose logs : domain below is replaced by 'foo.com'
|
Charles returns
|
Heres Surge returns
|
|
@shenyi0828 Where did you get the Surge proxy from? I'm trying to setup an HTTP/1.0 environment for testing. |
|
@shenyi0828 Can you test & verify the linked PR? |
Sorry, I'm not familiar with testing lib from source code. You can just install the Surge App , which can downloaded from https://nssurge.com/ , and then go to Overview -> LAN DEVICE TAKEOVER -> turn on "HTTP & SOCKS5 Proxy", will show ip:port -> setup mobile phone network system proxy to the ip:port got from previous step. ![]() |
@shenyi0828 Write this in your pubspec: dependencies:
dio_http2_adapter:
git:
url: https://github.com/cfug/dio
ref: 'fix/major-version-protocols'
path: plugins/http2_adapter |
Connection is established. But handshake failed.
|
I'd rather think it's the proxy issue than the adapter. |
proxy works fine with curl
got
|
by the way, another http2_adapter issue is that if backend DO NOT support HTTP/2 . Request will fail with error, on the contrast, curl will success with HTTP 1.1 . |
I cannot reproduce the issue locally. Can you provide a reproducible URL? logs:
|
Fixes #2053. According to RFC 2616/9110, protocols with the same major version will be allowed in responses. ### New Pull Request Checklist - [x] I have read the [Documentation](https://pub.dev/documentation/dio/latest/) - [x] I have searched for a similar pull request in the [project](https://github.com/cfug/dio/pulls) and found none - [x] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase) - [x] I have added the required tests to prove the fix/feature I'm adding - [x] I have updated the documentation (if necessary) - [x] I have run the tests without failures - [x] I have updated the `CHANGELOG.md` in the corresponding package --------- Signed-off-by: Alex Li <github@alexv525.com>
Package
http2_adapter
Version
1.2.4
Operating-System
Android, iOS, Web, MacOS, Linux, Windows
Output of
flutter doctor -v
No response
Dart Version
No response
Steps to Reproduce
Use Surge as System Proxy (HTTP)
Expected Result
Request as expected.
Actual Result
error: Proxy cannot be initialized
Good Example:
https://www.rfc-editor.org/rfc/rfc9110#section-9.3.6
RFC metions a 200 response is good . but code is
Also
Proxy-Connection: Keep-Alive
is good for proxyThe text was updated successfully, but these errors were encountered: