Add Shibboleth header to SOAP requests.
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Jun 2005 16:25:04 +0000 (16:25 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Jun 2005 16:25:04 +0000 (16:25 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1620 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/serviceprovider/ShibHttpHook.java

index e3ae0e2..61a2d6f 100644 (file)
@@ -42,6 +42,7 @@ import org.apache.log4j.Logger;
 import org.opensaml.SAMLException;
 import org.opensaml.SAMLSOAPHTTPBinding.HTTPHook;
 
+import edu.internet2.middleware.shibboleth.common.Constants;
 import edu.internet2.middleware.shibboleth.common.Credential;
 import edu.internet2.middleware.shibboleth.common.Credentials;
 import edu.internet2.middleware.shibboleth.common.Trust;
@@ -110,8 +111,11 @@ public class ShibHttpHook implements HTTPHook {
      */
     public boolean outgoing(HttpURLConnection conn, Object globalCtx,
             Object callCtx) throws SAMLException {
+       
+       conn.setRequestProperty("Shibboleth", Constants.SHIB_VERSION);
+       
         if (!(conn instanceof HttpsURLConnection)) {
-            return true; // HTTP (non-SSL) sessions need no processing
+            return true; // HTTP (non-SSL) sessions need no additional processing
         }
         // Cast to subclass with extra info
         HttpsURLConnection sslconn = (HttpsURLConnection) conn;