diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-11-09 10:04:39 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-11-09 10:04:39 +0100 |
commit | 8e2ce72dc1161eb5661ac99afbbcdd30f2b03283 (patch) | |
tree | 3d038649e391f176acee884190cb900564bfe506 /container-core | |
parent | 9cc12f086f2d1811558d9b2958b90a65e8d8d626 (diff) |
Use a static variable to communicate
Some third party code somewhere is calling setProperties,
wiping all properties set inside the VM at random times,
so communicate through a static variable instead.
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/jdisc/HttpRequest.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/HttpRequest.java b/container-core/src/main/java/com/yahoo/container/jdisc/HttpRequest.java index 7c114e0097b..f4dd655d80c 100644 --- a/container-core/src/main/java/com/yahoo/container/jdisc/HttpRequest.java +++ b/container-core/src/main/java/com/yahoo/container/jdisc/HttpRequest.java @@ -359,17 +359,15 @@ public class HttpRequest { public static HttpRequest createRequest(CurrentContainer container, URI uri, Method method, InputStream requestData, Map<String, String> properties) { - - final com.yahoo.jdisc.http.HttpRequest clientRequest = com.yahoo.jdisc.http.HttpRequest - .newClientRequest(new Request(container, uri), uri, method); + com.yahoo.jdisc.http.HttpRequest clientRequest = + com.yahoo.jdisc.http.HttpRequest.newClientRequest(new Request(container, uri), uri, method); setProperties(clientRequest, properties); return new HttpRequest(clientRequest, requestData); } private static void setProperties(com.yahoo.jdisc.http.HttpRequest clientRequest, Map<String, String> properties) { - if (properties == null) { - return; - } + if (properties == null) return; + for (Map.Entry<String, String> entry : properties.entrySet()) { clientRequest.parameters().put(entry.getKey(), wrap(entry.getValue())); } |