165{
166 HttpServletContextEx& ctx = session.
__ctx;
167 Writer& out = ctx.
writer();
168
169 out << L"<pre>\n";
170
171 out << L"PID : " << getpid() << L"\n";
172
173
174
175
176
177
178
179
180 out << L"CONTEXT INFO\n";
181 if (ctx.remoteAddr())
182 out << L"remoteAddr : " << ctx.remoteAddr() << L"\n";
183 out << L"remotePort : " << (int)ctx.remotePort() << L"\n";
184 if (ctx.method())
185 out << L"method : " << ctx.method() << L"\n";
186 out << L"remoteMethodNo : " << (int)ctx.methodNo() << L"\n";
187 if (ctx.path())
188 out << L"path : " << ctx.path() << L"\n";
189 if (ctx.queryString())
190 out << L"queryString : " << ctx.queryString() << L"\n";
191 if (ctx.contentType())
192 out << L"contentType : " << ctx.contentType() << L"\n";
193 out << L"contentLength: " << ctx.contentLength() << L"\n";
194 out << L"\n\n";
195
196 out << L"CGI VARIABLES\n"
197 << ctx.getCgiVariable((
const wchar_t*)
NULL)
198 << L"\n\n";
199
200 out << L"REQUEST HTTP HEADERS\n"
201 << ctx.getHttpHeader((
const wchar_t*)
NULL)
202 << L"\n\n";
203
204 out << L"COOKIES\n";
205 if (!ctx.__cookieMap.isEmpty()) {
206 ListedStringToStringMap::Iterator it = ctx.__cookieMap.begin();
207 for(; it != ctx.__cookieMap.end(); it++) {
208 out << (*it).key << L":" << (*it).value << L"\n";
209 }
210 }
211 out << L"\n\n";
212
213 out << L"QUERY_STRING\n";
214 if (!ctx.__queryMap.isEmpty()) {
215 ListedStringToStringArrayMap::Iterator it = ctx.__queryMap.begin();
216 for( ; it != ctx.__queryMap.end(); it++) {
217 out << (*it).key << L":"
218 << String::join((*it).value, L',', true)
219 << L"\n";
220 }
221 }
222 out << L"\n\n";
223
224 out << L"FORM_DATA\n";
225 if (!ctx.__formMap.isEmpty()) {
226 ListedStringToStringArrayMap::Iterator it = ctx.__formMap.begin();
227 for( ; it != ctx.__formMap.end(); it++) {
228 out << (*it).key << L":"
229 << String::join((*it).value, L',', true)
230 << L"\n";
231 }
232 }
233 out << L"\n\n";
234
235 out << L"FILES\n";
236 if (!ctx.__formFileMap.
isEmpty()) {
237 for(
size_t i = 0; i < ctx.__formFileMap.
size(); i++) {
238 StoredHttpFormData::FileInfoArray& v = ctx.__formFileMap[i];
239 out << v.name() << L":";
240 for(size_t j = 0; j < v.size(); j++) {
241 StoredHttpFormData::FileInfo& info = v[j];
242 out << L"\n\tfilename: " << info.filename
243 << L"\n\tfilesize: " << info.fileSize
244 << L"\n\tContent-Type: " << info.contentType
245 << L"\n\tContent-Transfer-Encoding: " << info.transferEncoding
246 << L"\n\ttemp filename: " << info.tempFilename
247 << L"\n";
248 }
249 }
250 }
251 out << L"\n\n";
252
253 out << L"</pre>\n";
254}
HttpServletContextEx & __ctx