2.0 SOAP Encoder
[shibboleth/cpp-opensaml.git] / saml / saml1 / binding / impl / SAML1SOAPEncoder.cpp
index 121acbe..b112dae 100644 (file)
@@ -70,6 +70,11 @@ long SAML1SOAPEncoder::encode(
         throw BindingException("Cannot encode XML content with parent.");
 
     genericResponse.setContentType("text/xml");
+    HTTPResponse* httpResponse = dynamic_cast<HTTPResponse*>(&genericResponse);
+    if (httpResponse) {
+        httpResponse->setHeader("Cache-Control", "no-cache, no-store, must-revalidate, private");
+        httpResponse->setHeader("Pragma", "no-cache");
+    }
 
     DOMElement* rootElement = NULL;
     Response* response = dynamic_cast<Response*>(xmlObject);