18#if __DCL_HAVE_THIS_FILE__
33 ctx.setContentType(L
"text/plain; charset=utf-8");
35 String strSessionID = ctx.__cookieMap[L
"session_id"];
36 if (strSessionID.isEmpty()) {
37 StringBuilder sb = ctx.remoteAddr();
38 sb += String::valueOf(ctx.remotePort());
39 sb += String::valueOf(time(
NULL));
48 ctx.addHeader(cookie);
53 Writer& out = ctx.writer();
55 out << L
"PID : " << getpid() << L
"\n";
56 out << L
"moduleName : " << __moduleName << L
"\n";
58 out << L
"BEGIN CONTEXT INFO\n";
59 out << L
"remoteAddr [" << ctx.remoteAddr() << L
"]\n";
60 out << L
"remotePort [" << ctx.remotePort() << L
"]\n";
61 out << L
"method [" << ctx.method() << L
"]\n";
62 out << L
"remoteMethodNo [" << ctx.methodNo() << L
"]\n";
63 out << L
"path [" << ctx.path() << L
"]\n";
64 out << L
"queryString [" << ctx.queryString() << L
"]\n";
65 out << L
"contentType [" << ctx.contentType() << L
"]\n";
66 out << L
"contentLength [" << ctx.contentLength() << L
"]\n";
67 out << L
"END CONTEXT INFO\n\n";
68 out << L
"BEGIN CGI VARIABLES\n"
69 << ctx.getCgiVariable((
const wchar_t*)
NULL)
70 << L
"END CGI VARIABLES\n\n";
71 out << L
"BEGIN REQUEST HTTP HEADERS\n"
72 << ctx.getHttpHeader((
const wchar_t*)
NULL)
73 << L
"END REQUEST HTTP HEADERS\n\n";
74 out << L
"BEGIN COOKIES\n";
75 if (!ctx.__cookieMap.isEmpty()) {
76 for(ListedStringToStringMap::Iterator it = ctx.__cookieMap.begin();
77 it != ctx.__cookieMap.end(); it++) {
78 out << (*it).key << L
":" << (*it).value << L
"\n";
81 out << L
"END COOKIES\n\n";
83 out << L
"BEGIN QUERY_STRING\n";
84 if (!ctx.__queryMap.isEmpty()) {
85 for(ListedStringToStringArrayMap::Iterator it = ctx.__queryMap.begin();
86 it != ctx.__queryMap.end(); it++) {
87 out << (*it).key << L
":";
88 StringArray& v = (*it).value;
89 for(
size_t i = 0; i < v.size(); i++) {
97 out << L
"END QUERY_STRING\n\n";
99 out << L
"BEGIN FORM_DATA\n";
100 if (!ctx.__formMap.isEmpty()) {
101 for(ListedStringToStringArrayMap::Iterator it = ctx.__formMap.begin();
102 it != ctx.__formMap.end(); it++) {
103 out << (*it).key << L
":";
104 StringArray& v = (*it).value;
105 for(
size_t i = 0; i < v.size(); i++) {
113 out << L
"END FORM_DATA\n\n";
115 out << L
"BEGIN FILES\n";
116 if (!ctx.__formFileMap.isEmpty()) {
117 for(
size_t i = 0; i < ctx.__formFileMap.size(); i++) {
118 StoredHttpFormData::FileInfoArray& v = ctx.__formFileMap[i];
119 out << v.name() << L
":";
120 for(
size_t j = 0; j < v.size(); j++) {
121 StoredHttpFormData::FileInfo& info = v[j];
122 out << L
"\n\tfilename: " << info.filename
123 << L
"\n\tfilesize: " << info.fileSize
124 << L
"\n\tContent-Type: " << info.contentType
125 << L
"\n\tContent-Transfer-Encoding: " << info.transferEncoding
126 << L
"\n\ttemp filename: " << info.tempFilename
129 Files::rename(info.tempFilename, info.tempFilename + L
"-renamed");
133 out << L
"END FILES\n\n";
154#ifdef __WINNT_NEW_DELETE_OVERRIDE
156__WINNT_NEW_DELETE_OVERRIDE
#define HTTP_SERVLET_INSTANCE(ServletClass, Description)
#define __DCL_TRACE1(fmt, arg1)
#define IMPLEMENT_CLASSINFO(class_name, base_class_name)
static void rename(const String &_oldpath, const String &_newpath) __DCL_THROWS1(IOException *)
virtual void onService(HttpServletContextEx &ctx)=0__DCL_THROWS1(Exception *)