Skip to content
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

HTTPS requests over HTTP proxy problem #393

Open
zzl221000 opened this issue Jul 5, 2023 · 1 comment
Open

HTTPS requests over HTTP proxy problem #393

zzl221000 opened this issue Jul 5, 2023 · 1 comment

Comments

@zzl221000
Copy link

Describe the bug
Unable to use proxy to access many https sites.

To Reproduce
Steps to reproduce the behavior:

async with aiosonic.HTTPClient(proxy=Proxy(proxy)) as client:
    resp = await client.get('https://github.com')
    print(resp.status) # 301
    print(resp.headers) # HttpHeaders({'Content-Length': '0', 'Location': 'https://github.com/'})
    resp2 = await client.get('https://github.com/')
    print(resp2.status) # 301
    print(resp2.headers) # HttpHeaders({'Content-Length': '0', 'Location': 'https://github.com/'})

Expected behavior
Response 200

Additional context
After debugging, I found that aiosonic uses the proxy without the CONNECT method to create the tunnel.

@sonic182
Copy link
Owner

Oh thanks!

I have missed that feature as you say, I don't know when I'll find a room for solving it, I hope in a week or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants