Skip to content

Use the CONNECT method URI as host fallback #68

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

Merged
merged 4 commits into from
May 14, 2022

Conversation

candrews
Copy link

@candrews candrews commented May 6, 2022

When a request is made for proxy interception using the CONNECT method but not including a host header, then a NullPointerException is thrown in com.browserup.bup.mitm.manager.ImpersonatingMitmManager.getHostnameImpersonatingSslContext(String, SSLSession) because the hostnameToImpersonate is null.

As a fallback, use the CONNECT URI as a host.

Submitted to the original proxy at browserup#371

When a request is made for proxy interception using the `CONNECT` method but not including a `host` header, then a `NullPointerException` is thrown in `com.browserup.bup.mitm.manager.ImpersonatingMitmManager.getHostnameImpersonatingSslContext(String, SSLSession)` because the `hostnameToImpersonate` is null.

As a fallback, use the CONNECT URI as a host.
@candrews candrews force-pushed the valfirst-CONNECT branch from f9c248a to 9a2f6fa Compare May 9, 2022 17:32
@valfirst
Copy link
Owner

@candrews could you please add unit/integration tests to cover the fixed issue?

@candrews
Copy link
Author

@candrews could you please add unit/integration tests to cover the fixed issue?

I've added a test that covers HTTP/1.0 support in ImpersonatingMitmManager

@valfirst valfirst merged commit 87fd558 into valfirst:master May 14, 2022
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

Successfully merging this pull request may close these issues.

2 participants