ISAPI filter

C

Chris Curvey

Hi all,

I'm trying to write an ISAPI filter in Python, using the examples that
come in the "isapi" directory of the win32com package. The
installation program itself runs fine, but when I examine the
properties of my web server, my filter has a big red down arrow next to
it. But I can't seem to figure out where I should be looking to find
the trouble. If anyone can point me to the right place (or see an
obvious error in the code below), I'd appreciate it.

-Chris

from isapi import isapicon, threaded_extension
from isapi.simple import SimpleFilter
import sys
import traceback
import urllib

##########################################################################
class ImageProtectFilter(SimpleFilter):
"Image Protection Filter"
filter_flags = isapicon.SF_NOTIFY_AUTHENTICATION

def HttpFilterProc(self, fc):
return isapicon.SF_STATUS_REQ_HANDLED_NOTIFICATION

#########################################################################
# The entry points for the ISAPI filter.
def __FilterFactory__():
return ImageProtectFilter()

if __name__=='__main__':
# If run from the command-line, install ourselves.
from isapi.install import *
params = ISAPIParameters()
# Setup all filters - these are global to the site.
params.Filters = [
FilterParameters(Name="ImageProtectFilter",
Description=ImageProtectFilter.__doc__),
]
HandleCommandLine(params)
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top