M
manunam
hi all,
I am creating an ISAPI filter in VC++. this filter has to check the
http client requests, and do some checks.
First of all, when a client requests a file, the filter checks if the
user exists in the db. This is done via the redefinition of the method
OnPreprocHeaders of the MFC class CHttpFilter.
In this method i check if the user exists and is active, then I check
if the file the user is requesting exists or not.
Now comes the difficult part: I want to store into the db the number
of bytes the client has downloaded; since the client is allowed to
download only a certain amount of bytes, the problem is determining
the exact size of the file he/she is downloading. At the moment I
check the requested file size, but this is not correct because the
transfer could be interrupted before it's finished.
I have tried to examine the raw data, using the OnReadRawData callback
method, but had no luck. How can i know the downloaded size???
I am creating an ISAPI filter in VC++. this filter has to check the
http client requests, and do some checks.
First of all, when a client requests a file, the filter checks if the
user exists in the db. This is done via the redefinition of the method
OnPreprocHeaders of the MFC class CHttpFilter.
In this method i check if the user exists and is active, then I check
if the file the user is requesting exists or not.
Now comes the difficult part: I want to store into the db the number
of bytes the client has downloaded; since the client is allowed to
download only a certain amount of bytes, the problem is determining
the exact size of the file he/she is downloading. At the moment I
check the requested file size, but this is not correct because the
transfer could be interrupted before it's finished.
I have tried to examine the raw data, using the OnReadRawData callback
method, but had no luck. How can i know the downloaded size???