Skip to content

Commit

Permalink
Update Grizzly and Jetty91 getRequestHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahchen6 committed Dec 18, 2024
1 parent c7f8230 commit dad5213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected int status(final Response response) {

@Override
protected String getRequestHeader(Request request, String headerName) {
return request.getHeaders().getFirstValue(headerName);
return request.getHeaders().getJoinedValue(headerName, ",");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import datadog.trace.bootstrap.instrumentation.api.UTF8BytesString;
import datadog.trace.bootstrap.instrumentation.decorator.HttpClientDecorator;
import java.net.URI;
import java.util.List;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;

Expand Down Expand Up @@ -38,7 +39,8 @@ protected int status(final Response httpResponse) {

@Override
protected String getRequestHeader(Request request, String headerName) {
return request.getHeaders().get(headerName);
List<String> result = request.getHeaders().getValuesList(headerName);
return String.join(",", result);
}

@Override
Expand Down

0 comments on commit dad5213

Please sign in to comment.