very difficult ISAPI filter question - help

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???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top