Skip to content

Commit c78987c

Browse files
authored
implement headers() in jetty12 request (#2140)
1 parent b448a45 commit c78987c

File tree

1 file changed

+10
-0
lines changed
  • instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12

1 file changed

+10
-0
lines changed

instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyRequest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ public String getHeader(String name) {
3434
return request.getHeaders().get(name);
3535
}
3636

37+
@Override
38+
public List<String> getHeaders(String name) {
39+
Enumeration<String> headers = request.getHeaders().getValues(name);
40+
if (headers == null) {
41+
return Collections.emptyList();
42+
}
43+
return Collections.list(headers);
44+
}
45+
3746
@Override
3847
public String getRequestURI() {
3948
return request.getHttpURI().getPath();
@@ -88,4 +97,5 @@ public String getCookieValue(String name) {
8897
}
8998
return null;
9099
}
100+
91101
}

0 commit comments

Comments
 (0)