For rfc8040 responses we are not getting the Location
returned in the response header. This addresses that.
Pulling this work from master commit in work for NETCONF-312
This patch https://git.opendaylight.org/gerrit/c/netconf/+/90371
JIRA: NETCONF-676
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ia84da3b9cf0789328af72607c8f739ff81c331a4
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
jsonWriter.endObject();
jsonWriter.flush();
}
+
+ if (httpHeaders != null) {
+ for (final Map.Entry<String, Object> entry : context.getNewHeaders().entrySet()) {
+ httpHeaders.add(entry.getKey(), entry.getValue());
+ }
+ }
}
private static void writeNormalizedNode(final JsonWriter jsonWriter,
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import javanet.staxutils.IndentingXMLStreamWriter;
import javax.ws.rs.Produces;
if (context.getData() == null) {
return;
}
+ if (httpHeaders != null) {
+ for (final Map.Entry<String, Object> entry : context.getNewHeaders().entrySet()) {
+ httpHeaders.add(entry.getKey(), entry.getValue());
+ }
+ }
XMLStreamWriter xmlWriter;
try {