This project is read-only.

Process Posted Data

Sep 22, 2008 at 3:25 PM
Hi. I've created an HttpModule which handles POST request. Although there is request.Body which gives a Stream of a request body I can not read from it because
it is closed. I digged a bit and i found that this Stream is a MemoryStream but I didn't find a proper workaround. I need this to handle posted data for example from
a SOAP message. Are there any solutions?
Thank you very much for your time.
Sep 22, 2008 at 4:02 PM
It's a bug if it's closed. I took a quick look, and the only thing I could find is that the XmlDecoder (in namespace HttpServer.FormDecoders) uses a StreamReader.
If i'm not mistaken, disposing a Reader will also close the stream.

I've removed the XmlDecoder from the default settings. Which means that Soap should work better (MultiPartDecoder and UrlDecoder do not close the stream).

FormDecoders are used to load data from the body into the Form property of the request.
Sep 23, 2008 at 8:01 AM
Revision 15857 seems to work as expected. Thank you very much indeed.