Return Location in resp header for notif subscrip
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / jersey / providers / NormalizedNodeXmlBodyWriter.java
index 9d849ec565001c49b76a495bc53c00cfea3f3ab1..a89caa90c96a20e3698c5d79ad466f66320f44b9 100644 (file)
@@ -14,6 +14,7 @@ import java.lang.annotation.Annotation;
 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;
@@ -84,6 +85,11 @@ public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter<Normalized
         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 {