Skip to content

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