ISAPI filter

Discussion in 'Python' started by Chris Curvey, Dec 4, 2006.

  1. Chris Curvey

    Chris Curvey Guest

    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)
     
    Chris Curvey, Dec 4, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Shutt
    Replies:
    0
    Views:
    829
    Michael Shutt
    Jun 26, 2003
  2. Jeremy
    Replies:
    1
    Views:
    670
    jeremy
    Aug 29, 2003
  3. Anonieko Ramos
    Replies:
    0
    Views:
    1,231
    Anonieko Ramos
    May 12, 2004
  4. Jon Maz
    Replies:
    2
    Views:
    4,634
    Jon Maz
    Sep 30, 2004
  5. Guoqi Zheng

    ISAPI filter or http module

    Guoqi Zheng, Jan 27, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    1,061
    Ben Lovell
    Jan 27, 2005
Loading...

Share This Page