Why does SiteMinder provides value of SM_USER using GetHttpRequestData() function in CF 5, Not in CF 7 or CF 8?
The same code is used from the asp and the cfm templates on both servers.
<%
Function GetAttribute(AttrName)
Dim AllAttrs
Dim RealAttrName
Dim Location
Dim Result
AllAttrs = Request.ServerVariables("ALL_HTTP")
RealAttrName = "HTTP_" & ucase(AttrName)
Location = instr(AllAttrs, RealAttrName & ":")
if Location <= 0 then
GetAttribute = ""
Exit Function
end if
Result = mid(AllAttrs, Location + Len(RealAttrName) + 1)
Location = instr(Result, chr(10))
if Location <= 0 then Location = len(Result) + 1
GetAttribute = left(Result, Location - 1)
End Function
smuser = GetAttribute("SM_USER")
url = request.querystring("url")
host = GetAttribute("HOST")
Response.Write(smuser)
Response.Write("<br>")
Response.Write(host)
<!--- Response.Redirect " & host & "/ned/sponsoridasp.cfm?smuser=" & smuser --->
%>
<P>
<%
foreach (string key in Request.Headers.Keys)
{
Response.Write("<br>" + key + ": " + Request.Headers[key]);
}
%>
and the ColdFusion code:
<cfset httpreq = GetHttpRequestData()>
<cfoutput>
<cfloop collection=#httpreq.headers# item="http_item">
<cfset httpvar= #StructFind(httpreq.headers, http_item)#>
<!--- <br>#http_item#: #httpvar# --->
<cfswitch expression="#http_item#">
<cfcase value="SM_USER">
<cfset netuser=httpvar>
<cfif netmsg EQ "">
<cfset netmsg="User id is " & httpvar>
<cfelse>
<cfset netmsg=netmsg & ". User id is " & httpvar>
</cfif>
</cfcase>
<cfcase value="SM_AUTHDIRNAME">
<cfset domain_nm=httpvar>
<cfif netmsg EQ "">
<cfset netmsg="User domain is " & httpvar>
<cfelse>
<cfset netmsg=netmsg & ". User domain is " & httpvar>
</cfif>
</cfcase>
<cfdefaultcase></cfdefaultcase>
</cfswitch>
</cfloop>
</cfoutput>
The same code is used from the asp and the cfm templates on both servers.
<%
Function GetAttribute(AttrName)
Dim AllAttrs
Dim RealAttrName
Dim Location
Dim Result
AllAttrs = Request.ServerVariables("ALL_HTTP")
RealAttrName = "HTTP_" & ucase(AttrName)
Location = instr(AllAttrs, RealAttrName & ":")
if Location <= 0 then
GetAttribute = ""
Exit Function
end if
Result = mid(AllAttrs, Location + Len(RealAttrName) + 1)
Location = instr(Result, chr(10))
if Location <= 0 then Location = len(Result) + 1
GetAttribute = left(Result, Location - 1)
End Function
smuser = GetAttribute("SM_USER")
url = request.querystring("url")
host = GetAttribute("HOST")
Response.Write(smuser)
Response.Write("<br>")
Response.Write(host)
<!--- Response.Redirect " & host & "/ned/sponsoridasp.cfm?smuser=" & smuser --->
%>
<P>
<%
foreach (string key in Request.Headers.Keys)
{
Response.Write("<br>" + key + ": " + Request.Headers[key]);
}
%>
and the ColdFusion code:
<cfset httpreq = GetHttpRequestData()>
<cfoutput>
<cfloop collection=#httpreq.headers# item="http_item">
<cfset httpvar= #StructFind(httpreq.headers, http_item)#>
<!--- <br>#http_item#: #httpvar# --->
<cfswitch expression="#http_item#">
<cfcase value="SM_USER">
<cfset netuser=httpvar>
<cfif netmsg EQ "">
<cfset netmsg="User id is " & httpvar>
<cfelse>
<cfset netmsg=netmsg & ". User id is " & httpvar>
</cfif>
</cfcase>
<cfcase value="SM_AUTHDIRNAME">
<cfset domain_nm=httpvar>
<cfif netmsg EQ "">
<cfset netmsg="User domain is " & httpvar>
<cfelse>
<cfset netmsg=netmsg & ". User domain is " & httpvar>
</cfif>
</cfcase>
<cfdefaultcase></cfdefaultcase>
</cfswitch>
</cfloop>
</cfoutput>