-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhttprequestreporter.peoplecode
More file actions
207 lines (205 loc) · 13.9 KB
/
httprequestreporter.peoplecode
File metadata and controls
207 lines (205 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
Function report_HTTP_Request_Environment() Returns string
/*
This Signon PeopleCode extracts and reports the HTTP request data.
It returns all the information in a single string variable.
*/
Local string &result;
Local string &indent = " ";
Local string &EOL = Char(10);
Local array of string &headerNames_array;
Local array of string &cookieNames_array;
Local array of string ¶meterNames_array;
Local array of string ¶meterValues_array;
/* -------------------------------------------------------------------------------- */
&result = &result | "***** HTTP Request Headers" | &EOL;
&headerNames_array = %Request.GetHeaderNames();
For &IX = 1 To &headerNames_array.Len;
If &headerNames_array [&IX] = "Cookie" Then
&result = &result | &indent | &headerNames_array [&IX] | " = <not printed here>" | &EOL;
Else
&result = &result | &indent | &headerNames_array [&IX] | " = " | %Request.GetHeader(&headerNames_array [&IX]) | &EOL;
End-If
End-For;
/* -------------------------------------------------------------------------------- */
&result = &result | &EOL;
&result = &result | "***** HTTP Request Cookies" | &EOL;
&cookieNames_array = %Request.GetCookieNames();
For &IX = 1 To &cookieNames_array.Len;
&result = &result | &indent | &cookieNames_array [&IX] | " = " | %Request.GetCookieValue(&cookieNames_array [&IX]) | &EOL;
End-For;
/* -------------------------------------------------------------------------------- */
&result = &result | &EOL;
&result = &result | "***** HTTP Request Parameters" | &EOL;
¶meterNames_array = %Request.GetParameterNames();
For &IX = 1 To ¶meterNames_array.Len;
&result = &result | &indent | ¶meterNames_array [&IX] | " = " | %Request.GetParameter(¶meterNames_array [&IX]) | &EOL;
¶meterValues_array = %Request.GetParameterValues(¶meterNames_array [&IX]);
For &JX = 1 To ¶meterValues_array.Len;
&result = &result | &indent | &indent | ¶meterNames_array [&IX] | "." | &JX | " = " | ¶meterValues_array [&JX] | &EOL;
End-For;
End-For;
/* -------------------------------------------------------------------------------- */
&result = &result | &EOL;
&result = &result | "***** HTTP Request class Properties" | &EOL;
&result = &result | &indent | " AuthTokenDomain = " | %Request.AuthTokenDomain | &EOL;
&result = &result | &indent | " AuthType = " | %Request.AuthType | &EOL;
&result = &result | &indent | " BrowserDeviceFormFactor [Fluid Only] = " | %Request.BrowserDeviceFormFactor | &EOL;
&result = &result | &indent | " BrowserDeviceType [Fluid Only] = " | %Request.BrowserDeviceType | &EOL;
&result = &result | &indent | " BrowserFluidCapable [Fluid Only] = " | %Request.BrowserFluidCapable | &EOL;
&result = &result | &indent | " BrowserPlatform = " | %Request.BrowserPlatform | &EOL;
&result = &result | &indent | " BrowserPlatformClass [Fluid Only] = " | %Request.BrowserPlatformClass | &EOL;
&result = &result | &indent | " BrowserType = " | %Request.BrowserType | &EOL;
&result = &result | &indent | " BrowserTypeClass [Fluid Only] = " | %Request.BrowserTypeClass | &EOL;
&result = &result | &indent | " BrowserVersion = " | %Request.BrowserVersion | &EOL;
&result = &result | &indent | " ByPassSignOn = " | %Request.ByPassSignOn | &EOL;
&result = &result | &indent | " ContentURI = " | %Request.ContentURI | &EOL;
&result = &result | &indent | " ExpireMeta = " | %Request.ExpireMeta | &EOL;
&result = &result | &indent | " ExtraLarge [Fluid Only] = " | %Request.ExtraLarge | &EOL;
&result = &result | &indent | " FullURI = " | %Request.FullURI | &EOL;
&result = &result | &indent | " HTTPMethod = " | %Request.HTTPMethod | &EOL;
&result = &result | &indent | " Large [Fluid Only] = " | %Request.Large | &EOL;
&result = &result | &indent | " LogoutURL = " | %Request.LogoutURL | &EOL;
&result = &result | &indent | " Medium [Fluid Only] = " | %Request.Medium | &EOL;
&result = &result | &indent | " PathInfo = " | %Request.PathInfo | &EOL;
&result = &result | &indent | " Protocol = " | %Request.Protocol | &EOL;
&result = &result | &indent | " QueryString = " | %Request.QueryString | &EOL;
&result = &result | &indent | " RelativeURL = " | %Request.RelativeURL | &EOL;
&result = &result | &indent | " RemoteAddr = " | %Request.RemoteAddr | &EOL;
&result = &result | &indent | " RemoteHost = " | %Request.RemoteHost | &EOL;
&result = &result | &indent | " RemoteUser = " | %Request.RemoteUser | &EOL;
&result = &result | &indent | " RequestURI = " | %Request.RequestURI | &EOL;
&result = &result | &indent | " Scheme = " | %Request.Scheme | &EOL;
&result = &result | &indent | " ServerName = " | %Request.ServerName | &EOL;
&result = &result | &indent | " ServerPort = " | %Request.ServerPort | &EOL;
&result = &result | &indent | " ServletPath = " | %Request.ServletPath | &EOL;
&result = &result | &indent | " Small [Fluid Only] = " | %Request.Small | &EOL;
&result = &result | &indent | " Timeout = " | %Request.Timeout | &EOL;
/* -------------------------------------------------------------------------------- */
&result = &result | &EOL;
&result = &result | "***** Other HTTP Request Content" | &EOL;
&result = &result | &indent | " GetContentBody() = " | %Request.GetContentBody() | &EOL;
&result = &result | &indent | " GetDeviceInfo()" | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""canvas"") = " | %Request.GetDeviceInfo("canvas") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""clientHeight"") = " | %Request.GetDeviceInfo("clientHeight") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""clientWidth"") = " | %Request.GetDeviceInfo("clientWidth") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""datepicker"") = " | %Request.GetDeviceInfo("datepicker") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""dnd"") = " | %Request.GetDeviceInfo("dnd") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""dtpicker"") = " | %Request.GetDeviceInfo("dtpicker") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""geolocation"") = " | %Request.GetDeviceInfo("geolocation") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""hc"") = " | %Request.GetDeviceInfo("hc") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""height"") = " | %Request.GetDeviceInfo("height") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""history"") = " | %Request.GetDeviceInfo("history") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""localstorage"") = " | %Request.GetDeviceInfo("localstorage") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""maf"") = " | %Request.GetDeviceInfo("maf") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""pixelratio"") = " | %Request.GetDeviceInfo("pixelratio") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""postmessage"") = " | %Request.GetDeviceInfo("postmessage") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""sessionstorage"") = " | %Request.GetDeviceInfo("sessionstorage") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""svg"") = " | %Request.GetDeviceInfo("svg") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""timepicker"") = " | %Request.GetDeviceInfo("timepicker") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""touch"") = " | %Request.GetDeviceInfo("touch") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""websockets"") = " | %Request.GetDeviceInfo("websockets") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""webworkers"") = " | %Request.GetDeviceInfo("webworkers") | &EOL;
&result = &result | &indent | &indent | " GetDeviceInfo(""width"") = " | %Request.GetDeviceInfo("width") | &EOL;
/* -------------------------------------------------------------------------------- */
&result = &result | &EOL;
&result = &result | "***** PeopleCode system variables" | &EOL;
&result = &result | &indent | " %AllowNotification = " | %AllowNotification | &EOL;
&result = &result | &indent | " %AllowRecipientLookup = " | %AllowRecipientLookup | &EOL;
&result = &result | &indent | " %ApplicationLogFence = " | %ApplicationLogFence | &EOL;
&result = &result | &indent | " %AsOfDate = " | %AsOfDate | &EOL;
&result = &result | &indent | " %AuthenticationToken = " | %AuthenticationToken | &EOL;
&result = &result | &indent | " %ClientDate = " | %ClientDate | &EOL;
&result = &result | &indent | " %ClientTimeZone = " | %ClientTimeZone | &EOL;
&result = &result | &indent | " %CompIntfcName = " | %CompIntfcName | &EOL;
&result = &result | &indent | " %Component = " | %Component | &EOL;
&result = &result | &indent | " %ContentID = " | %ContentID | &EOL;
&result = &result | &indent | " %ContentType = " | %ContentType | &EOL;
&result = &result | &indent | " %Copyright = " | %Copyright | &EOL;
&result = &result | &indent | " %Currency = " | %Currency | &EOL;
&result = &result | &indent | " %Date = " | %Date | &EOL;
&result = &result | &indent | " %DateTime = " | %Datetime | &EOL;
&result = &result | &indent | " %DbName = " | %DbName | &EOL;
&result = &result | &indent | " %DbServerName = " | %DbServerName | &EOL;
&result = &result | &indent | " %DbType = " | %DbType | &EOL;
&result = &result | &indent | " %EmailAddress = " | %EmailAddress | &EOL;
&result = &result | &indent | " %EmployeeId = " | %EmployeeId | &EOL;
&result = &result | &indent | " %HPTabName = " | %HPTabName | &EOL;
&result = &result | &indent | " %IB_JSON = " | %IB_JSON | &EOL;
&result = &result | &indent | " %IB_XML = " | %IB_XML | &EOL;
&result = &result | &indent | " %Import = " | %Import | &EOL;
&result = &result | &indent | " %IntBroker = " | %IntBroker | &EOL;
&result = &result | &indent | " %IsMultiLanguageEnabled = " | %IsMultiLanguageEnabled | &EOL;
&result = &result | &indent | " %Language = " | %Language | &EOL;
&result = &result | &indent | " %Language_Base = " | %Language_Base | &EOL;
&result = &result | &indent | " %Language_Data = " | %Language_Data | &EOL;
&result = &result | &indent | " %Language_User = " | %Language_User | &EOL;
&result = &result | &indent | " %LocalNode = " | %LocalNode | &EOL;
&result = &result | &indent | " %Market = " | %Market | &EOL;
&result = &result | &indent | " %MaxMessageSize = " | %MaxMessageSize | &EOL;
&result = &result | &indent | " %MaxNbrSegments = " | %MaxNbrSegments | &EOL;
&result = &result | &indent | " %Menu = " | %Menu | &EOL;
&result = &result | &indent | " %Mode = " | %Mode | &EOL;
&result = &result | &indent | " %NavigatorHomePermissionList = " | %NavigatorHomePermissionList | &EOL;
&result = &result | &indent | " %Node = " | %Node | &EOL;
&result = &result | &indent | " %OperatorClass [Obsolete] = " | %OperatorClass | &EOL;
&result = &result | &indent | " %OperatorId [Obsolete] = " | %OperatorId | &EOL;
&result = &result | &indent | " %OperatorRowLevelSecurityClass [Obsolete] = " | %OperatorRowLevelSecurityClass | &EOL;
&result = &result | &indent | " %Page = " | %Page | &EOL;
&result = &result | &indent | " %Panel [Obsolete] = " | %Panel | &EOL;
&result = &result | &indent | " %PanelGroup [Obsolete] = " | %PanelGroup | &EOL;
&result = &result | &indent | " %PasswordExpired = " | %PasswordExpired | &EOL;
&result = &result | &indent | " %PerfTime = " | %PerfTime | &EOL;
&result = &result | &indent | " %PermissionLists " | &EOL;
For &IX = 1 To %PermissionLists.Len;
&result = &result | &indent | &indent | " %PermissionLists [" | &IX | "] = " | %PermissionLists [&IX] | &EOL;
End-For;
&result = &result | &indent | " %PID = " | %PID | &EOL;
&result = &result | &indent | " %Portal = " | %Portal | &EOL;
&result = &result | &indent | " %PrimaryPermissionList = " | %PrimaryPermissionList | &EOL;
&result = &result | &indent | " %ProcessProfilePermissionList = " | %ProcessProfilePermissionList | &EOL;
&result = &result | &indent | " %PSAuthResult = " | %PSAuthResult | &EOL;
&result = &result | &indent | " %Roles " | &EOL;
For &IX = 1 To %Roles.Len;
&result = &result | &indent | &indent | " %Roles [" | &IX | "] = " | %Roles [&IX] | &EOL;
End-For;
&result = &result | &indent | " %RowSecurityPermissionList = " | %RowSecurityPermissionList | &EOL;
&result = &result | &indent | " %RunningInPortal = " | %RunningInPortal | &EOL;
&result = &result | &indent | " %ServerTimeZone = " | %ServerTimeZone | &EOL;
&result = &result | &indent | " %Session = " | %Session | &EOL;
&result = &result | &indent | " %SMTPBlackberryReplyTo = " | %SMTPBlackberryReplyTo | &EOL;
&result = &result | &indent | " %SMTPGuaranteed = " | %SMTPGuaranteed | &EOL;
&result = &result | &indent | " %SMTPSender = " | %SMTPSender | &EOL;
&result = &result | &indent | " %Time = " | %Time | &EOL;
&result = &result | &indent | " %ToolsRelease = " | %ToolsRelease | &EOL;
&result = &result | &indent | " %UserDescription = " | %UserDescription | &EOL;
&result = &result | &indent | " %UserId = " | %UserId | &EOL;
&result = &result | &indent | " %WLInstanceID = " | %WLInstanceId | &EOL;
&result = &result | &indent | " %WLName = " | %WLName | &EOL;
Return &result;
End-Function;
PSHTTPDUMP.PT_LPROPVALUE = report_HTTP_Request_Environment();