55{
59 __queryMap
60 );
61 }
62
64
66 addHeader(HttpHeader(L"Cache-Control", L"no-cache"));
67
68 size_t nLength = contentLength();
69 if (nLength && (nMaxContentLength == 0 || nLength <= nMaxContentLength)) {
72 String str;
73 ByteBuffer* buf = ByteBuffer::create(nLength);
74 try {
75 size_t nRead = read(buf->data(), nLength);
76 buf->__dataLength = nRead;
77 *(buf->data() + buf->__dataLength) = L'\0';
78 ByteString s = buf;
79 buf->release();
81
83 }
84 catch(IOException* e) {
85 buf->release();
86 throw e;
87 }
88 }
89 else if (HttpFormDataDecoder::isValidType(
__context->pszContentType)) {
90
91 HttpInputStream input(this);
92#if 0
93 FileOutputStream output(__formFileMap.__tempDir + L"post.data", true);
95#endif
96 HttpFormDataDecoder decoder;
97
99 input,
101 contentLength(),
102 __formMap,
103 __formFileMap
104 );
105#ifdef __DCL_DEBUG
106 if (!decoder.
warnings().isEmpty()) {
109 }
110#endif
111 }
112 else {
113 __DCL_TRACE1(L
"Unknown Content-Type[%ls]\n", contentType().data());
114
115 }
116 }
117
118 }
119}
#define __DCL_TRACE0(psz)
#define __DCL_TRACE1(fmt, arg1)
#define __DCL_ASSERT(expr)
static size_t copy(InputStream &_input, OutputStream &_output) __DCL_THROWS1(IOException *)
static void decode(const ByteString &_contents, ListedStringToStringMap &_results)
static void decode(const ByteString &_queryString, ListedStringToStringArrayMap &_results)
static bool isValidType(const char *_contentType)
const DCL_HTTP_SERVLET_CONTEXT * __context