This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Fix NPE in ClientToProxyConnection while closing the client connection#13
Merged
mjallday merged 1 commit intoJun 1, 2017
Merged
Conversation
|
👍 looks. can we get a test? |
Author
|
@mjallday I couldn't reproduce the issue locally, unfortunately :( |
mjallday
approved these changes
Jun 1, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/verygoodsecurity/vault/issues/1402
Due to currentHttpRequest can be null need to add not null verification, otherwise NPE can occurred.
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ProxyToServerConnection.java#L290
The currentHttpRequest goes the following route:
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java#L858
but DOES NOT in keep alive checking
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java#L869
that's why we got NPE
I've checked all other places where NPE can be raised as well, just need to fix it here.
ProxyToServerConnection