Imported Upstream version 2.4+dfsg
[shibboleth/sp.git] / shibsp / handler / RemotedHandler.h
index d7bdd8a..ef1a25c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,8 @@
 #include <shibsp/handler/Handler.h>
 #include <shibsp/remoting/ListenerService.h>
 
+#include <set>
+
 namespace xmltooling {
     class XMLTOOL_API HTTPRequest;
     class XMLTOOL_API HTTPResponse;
@@ -38,9 +40,18 @@ namespace shibsp {
      */
     class SHIBSP_API RemotedHandler : public virtual Handler, public Remoted 
     {
+        static std::set<std::string> m_remotedHeaders;
+
     public:
         virtual ~RemotedHandler();
 
+        /**
+         * Ensures that a request header will be remoted.
+         *
+         * @param header    name of request header to remote
+         */
+        static void addRemotedHeader(const char* header);
+
     protected:
         RemotedHandler();
 
@@ -56,11 +67,11 @@ namespace shibsp {
          * to remote the request information.
          *
          * @param request   an SPRequest to remote
-         * @param headers   array of request headers to copy to remote request
+         * @param headers   array of additional request headers to copy to remote request
          * @param certs     true iff client certificates should be available for the remote request
          * @return  the input dataflow object
          */
-        DDF wrap(const SPRequest& request, const std::vector<std::string>* headers=NULL, bool certs=false) const;
+        DDF wrap(const SPRequest& request, const std::vector<std::string>* headers=nullptr, bool certs=false) const;
         
         /**
          * Unwraps a response by examining an incoming data flow to determine