HttpModule, inside OnEndRequest
I do this
-> from HttpContext I get the response (GetResponse()), then call GetStatus, and if code is 404, I change it to 500 (just for fun) ... -> works... I get the 404 message with a 500 code...
next -> I tryed to add an additional HTTP_DATA_CHUNK to the response... so, I did build it, and added it by calling WriteEntityChunkByReference ... after that, the 404 message had the 500 code plus an additional text at the end of the message... fine... then I thought, let's exchange the context-type too... -> works... so, I can completely modify the 404 messages to whatever I want...
but I cannot remove the DataChunks that are already in the response... so, that's why I thought... I should call "Clear()" on the response before setting all those headers and things... so, that's what I did and now -> I don't get the Data-Chunks displayed anymore in the browser... simply the standard errors generated by the browser... so, what's wrong? what does "Clear()" delete that I don't set? ... by the way... wen I set the status of 200... I can see the text in the browser... only if I set an error code, everything disapears... so, what's missing? ... what's the difference to the case before??