programming-examples/asp/Sessions_SQL/GetHeaders Function.asp

19 lines
483 B
Plaintext
Raw Permalink Normal View History

2019-11-18 14:25:58 +01:00
<%
Private Function GetHeaders()
Dim item, d, sKey, sItem
Set d = CreateObject("Scripting.Dictionary")
d.RemoveAll
For Each item In Request.ServerVariables
If Left(UCase(item), 5) = "HTTP_" Then
sKey = Replace(Right(UCase(item), Len(item) - 5), "_", "-")
sItem = Request.ServerVariables(item)
If Not d.Exists(sKey) Then d.Add sKey, sItem
End If
Next
Set GetHeaders = d
End Function
%>