Hello.
I am stuck with http authentication filter problem.

What I have to do is to implement a new HTTP authentification filter which supports those authentications that the existing Symbian authentication does not support.

So, I implemnted a new class inheriting from MHTTPFilter.
class CMyAuthFilter : public MHTTPFilter
{
public :
public :
static CMyAuthFilter * CreateFilterL(RHTTPSession& aSession);

void MHFUnload(RHTTPSession aSession, THTTPFilterHandle aHandle);
void MHFLoad(RHTTPSession aSession, THTTPFilterHandle aHandle);
void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
void MHFSessionRunL(const THTTPSessionEvent& aEvent);
TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent);

~CMyAuthFilter ();

private:
void ConstructL(RHTTPSession& aHttpSession);

RStringF iFilterName;
};

To add this filter, I called an API as follows:
aSession.FilterCollection().AddFilterL(*this,
THTTPEvent::EGotResponseHeaders,
aSession.StringPool().StringF(HTTP::EWWWAuthenticate, RHTTPSession::GetTable()),
EHttpStatusCodeAuthenticate,
EStatusCodeHandler,
iFilterName);

The inside of MHFRunL is as follows:
void CMyAuthFilter::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
{
if (aEvent == THTTPEvent::EGotResponseHeaders)
{
RHTTPResponse httpResp = aTransaction.Response();
if (httpResp.StatusCode() == EHttpStatusCodeAuthenticate)
{
// do something...
}
}
}

My question is that after MHFRunL has been executed, HTTPEvent is still sent to the client, which called an API for sending data.
In order for this filter to work correctly, no HTTP event are supposed to be returned to the client until this filter resend new data to the server after authentication.

So, please let me know what I have done wrong.
For your information, I am a total stranger in Symbian.

Thanks in advance.