Skip to content

Commit

Permalink
Merge pull request #1842 from newrelic/httpurlconnection-comment
Browse files Browse the repository at this point in the history
Add comment to HttpUrlConnection InboundWrapper
  • Loading branch information
jasonjkeller authored Apr 5, 2024
2 parents ef98cb6 + 8195815 commit 8f2d779
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class InboundWrapper extends ExtendedInboundHeaders {
private final HttpURLConnection connection;

public InboundWrapper(HttpURLConnection connection) {
// Do not try to optimize by holding a reference to the header map obtained from HttpURLConnection.getHeaderFields
// instead of holding a reference to the HttpURLConnection instance, as it will trigger a call to
// HttpURLConnection.getInputStream and infinitely loop through this instrumentation.
this.connection = connection;
}

Expand Down

0 comments on commit 8f2d779

Please sign in to comment.