mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Fix overriding Jetty's User-Agent in HttpUtil (#3411)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
+5
-1
@@ -213,7 +213,11 @@ public class HttpUtil {
|
||||
|
||||
if (httpHeaders != null) {
|
||||
for (String httpHeaderKey : httpHeaders.stringPropertyNames()) {
|
||||
request.header(httpHeaderKey, httpHeaders.getProperty(httpHeaderKey));
|
||||
if (httpHeaderKey.equalsIgnoreCase(HttpHeader.USER_AGENT.toString())) {
|
||||
request.agent(httpHeaders.getProperty(httpHeaderKey));
|
||||
} else {
|
||||
request.header(httpHeaderKey, httpHeaders.getProperty(httpHeaderKey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user