|
|
@ -19,7 +19,7 @@ package org.springframework.boot.actuate.web.trace.servlet;
|
|
|
|
import java.net.URI;
|
|
|
|
import java.net.URI;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Enumeration;
|
|
|
|
import java.util.Enumeration;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -85,17 +85,9 @@ final class TraceableHttpServletRequest implements TraceableRequest {
|
|
|
|
Enumeration<String> names = this.request.getHeaderNames();
|
|
|
|
Enumeration<String> names = this.request.getHeaderNames();
|
|
|
|
while (names.hasMoreElements()) {
|
|
|
|
while (names.hasMoreElements()) {
|
|
|
|
String name = names.nextElement();
|
|
|
|
String name = names.nextElement();
|
|
|
|
headers.put(name, toList(this.request.getHeaders(name)));
|
|
|
|
headers.put(name, Collections.list(this.request.getHeaders(name)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return headers;
|
|
|
|
return headers;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<String> toList(Enumeration<String> enumeration) {
|
|
|
|
|
|
|
|
List<String> list = new ArrayList<>();
|
|
|
|
|
|
|
|
while (enumeration.hasMoreElements()) {
|
|
|
|
|
|
|
|
list.add(enumeration.nextElement());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|