Skip to content

Commit 67ff6be

Browse files
authored
Merge pull request #1234 from dmetzgar/fix-tracecontextcorrelation
Fix index out of bounds exception
2 parents 964ea69 + 8d3774c commit 67ff6be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/main/java/com/microsoft/applicationinsights/web/internal/correlation/TraceContextCorrelation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public static String generateChildDependencyTarget(String requestContext) {
370370
String[] keyValue = requestContext.split("=");
371371

372372
String headerAppID = null;
373-
if (keyValue[0].equals(REQUEST_CONTEXT_HEADER_APPID_KEY)) {
373+
if (keyValue.length == 2 && keyValue[0].equals(REQUEST_CONTEXT_HEADER_APPID_KEY)) {
374374
headerAppID = keyValue[1];
375375
}
376376

0 commit comments

Comments
 (0)