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)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to