home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-python-addon-1.4.9-installer.exe / apache.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2004-10-01  |  28.1 KB  |  773 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.3)
  3.  
  4. import sys
  5. import traceback
  6. import time
  7. import os
  8. import pdb
  9. import stat
  10. import imp
  11. import types
  12. import _apache
  13. _path = None
  14.  
  15. class CallBack:
  16.     '''
  17.     A generic callback object.
  18.     '''
  19.     
  20.     class HStack:
  21.         '''
  22.         The actual stack string lives in the request object so
  23.         it can be manipulated by both apache.py and mod_python.c
  24.         '''
  25.         
  26.         def __init__(self, req):
  27.             self.req = req
  28.  
  29.         
  30.         def pop(self):
  31.             handlers = self.req.hstack.split()
  32.             if not handlers:
  33.                 return None
  34.             else:
  35.                 self.req.hstack = ' '.join(handlers[1:])
  36.                 return handlers[0]
  37.  
  38.  
  39.     
  40.     def ConnectionDispatch(self, conn):
  41.         global _path
  42.         config = conn.base_server.get_config()
  43.         debug = int(config.get('PythonDebug', 0))
  44.         
  45.         try:
  46.             handler = conn.hlist.handler
  47.             l = handler.split('::', 1)
  48.             module_name = l[0]
  49.             if len(l) == 1:
  50.                 object_str = 'connectionhandler'
  51.             else:
  52.                 object_str = l[1]
  53.             if config.has_key('PythonPath'):
  54.                 pathstring = config['PythonPath']
  55.                 if pathstring != _path:
  56.                     _path = pathstring
  57.                     newpath = eval(pathstring)
  58.                     if sys.path != newpath:
  59.                         sys.path[:] = newpath
  60.                     
  61.                 
  62.             
  63.             module = import_module(module_name, autoreload = int(config.get('PythonAutoReload', 1)), log = debug)
  64.             object = resolve_object(module, object_str, arg = conn, silent = 0)
  65.             if object:
  66.                 if config.has_key('PythonEnablePdb'):
  67.                     result = pdb.runcall(object, conn)
  68.                 else:
  69.                     result = object(conn)
  70.         except PROG_TRACEBACK:
  71.             traceblock = None
  72.             
  73.             try:
  74.                 (etype, value, traceback) = traceblock
  75.                 result = self.ReportError(etype, value, traceback, srv = conn.base_server, phase = 'ConnectionHandler', hname = handler, debug = debug)
  76.             finally:
  77.                 traceback = None
  78.  
  79.         except:
  80.             
  81.             try:
  82.                 (exc_type, exc_value, exc_traceback) = sys.exc_info()
  83.                 result = self.ReportError(exc_type, exc_value, exc_traceback, srv = conn.base_server, phase = 'ConnectionHandler', hname = handler, debug = debug)
  84.             finally:
  85.                 exc_traceback = None
  86.  
  87.  
  88.         return result
  89.  
  90.     
  91.     def FilterDispatch(self, filter):
  92.         global _path
  93.         req = filter.req
  94.         config = req.get_config()
  95.         debug = int(config.get('PythonDebug', 0))
  96.         
  97.         try:
  98.             l = filter.handler.split('::', 1)
  99.             module_name = l[0]
  100.             if len(l) == 1:
  101.                 if filter.is_input:
  102.                     object_str = 'inputfilter'
  103.                 else:
  104.                     object_str = 'outputfilter'
  105.             else:
  106.                 object_str = l[1]
  107.             if config.has_key('PythonPath'):
  108.                 pathstring = config['PythonPath']
  109.                 if pathstring != _path:
  110.                     _path = pathstring
  111.                     newpath = eval(pathstring)
  112.                     if sys.path != newpath:
  113.                         sys.path[:] = newpath
  114.                     
  115.                 
  116.             elif filter.dir and filter.dir not in sys.path:
  117.                 sys.path[:0] = [
  118.                     filter.dir]
  119.             
  120.             module = import_module(module_name, autoreload = int(config.get('PythonAutoReload', 1)), log = debug)
  121.             object = resolve_object(module, object_str, arg = filter, silent = 0)
  122.             if object:
  123.                 if config.has_key('PythonEnablePdb'):
  124.                     pdb.runcall(object, filter)
  125.                 else:
  126.                     object(filter)
  127.                 filter.flush()
  128.         except SERVER_RETURN:
  129.             value = None
  130.             
  131.             try:
  132.                 if len(value.args) == 2:
  133.                     (result, status) = value.args
  134.                     if status:
  135.                         req.status = status
  136.                     
  137.                 else:
  138.                     result = value.args[0]
  139.                 if type(result) != type(7):
  140.                     s = 'Value raised with SERVER_RETURN is invalid. It is a '
  141.                     s = s + '%s, but it must be a tuple or an int.' % type(result)
  142.                     _apache.log_error(s, APLOG_NOERRNO | APLOG_ERR, req.server)
  143.                     return None
  144.  
  145.         except PROG_TRACEBACK:
  146.             traceblock = None
  147.             
  148.             try:
  149.                 (etype, value, traceback) = traceblock
  150.                 filter.disable()
  151.                 result = self.ReportError(etype, value, traceback, req = req, filter = filter, phase = 'Filter: ' + filter.name, hname = filter.handler, debug = debug)
  152.             finally:
  153.                 traceback = None
  154.  
  155.         except:
  156.             
  157.             try:
  158.                 (exc_type, exc_value, exc_traceback) = sys.exc_info()
  159.                 filter.disable()
  160.                 result = self.ReportError(exc_type, exc_value, exc_traceback, req = req, filter = filter, phase = filter.name, hname = filter.handler, debug = debug)
  161.             finally:
  162.                 exc_traceback = None
  163.  
  164.  
  165.         return OK
  166.  
  167.     
  168.     def HandlerDispatch(self, req):
  169.         '''
  170.         This is the handler dispatcher.
  171.         '''
  172.         global _path
  173.         result = HTTP_INTERNAL_SERVER_ERROR
  174.         config = req.get_config()
  175.         debug = int(config.get('PythonDebug', 0))
  176.         
  177.         try:
  178.             hlist = req.hlist
  179.             while hlist.handler:
  180.                 l = hlist.handler.split('::', 1)
  181.                 module_name = l[0]
  182.                 if len(l) == 1:
  183.                     object_str = req.phase[len('python'):].lower()
  184.                 else:
  185.                     object_str = l[1]
  186.                 if config.has_key('PythonPath'):
  187.                     pathstring = config['PythonPath']
  188.                     if pathstring != _path:
  189.                         _path = pathstring
  190.                         newpath = eval(pathstring)
  191.                         if sys.path != newpath:
  192.                             sys.path[:] = newpath
  193.                         
  194.                     
  195.                 else:
  196.                     dir = hlist.directory
  197.                     if dir and dir not in sys.path:
  198.                         sys.path[:0] = [
  199.                             dir]
  200.                     
  201.                 module = import_module(module_name, autoreload = int(config.get('PythonAutoReload', 1)), log = debug)
  202.                 object = resolve_object(module, object_str, arg = req, silent = hlist.silent)
  203.                 if object:
  204.                     if config.has_key('PythonEnablePdb'):
  205.                         result = pdb.runcall(object, req)
  206.                     else:
  207.                         result = object(req)
  208.                     if result != OK:
  209.                         break
  210.                     
  211.                 elif hlist.silent:
  212.                     result = DECLINED
  213.                 
  214.                 hlist.next()
  215.         except SERVER_RETURN:
  216.             value = None
  217.             
  218.             try:
  219.                 if len(value.args) == 2:
  220.                     (result, status) = value.args
  221.                     if status:
  222.                         req.status = status
  223.                     
  224.                 else:
  225.                     result = value.args[0]
  226.                 if type(result) != type(7):
  227.                     s = 'Value raised with SERVER_RETURN is invalid. It is a '
  228.                     s = s + '%s, but it must be a tuple or an int.' % type(result)
  229.                     _apache.log_error(s, APLOG_NOERRNO | APLOG_ERR, req.server)
  230.                     return HTTP_INTERNAL_SERVER_ERROR
  231.  
  232.         except PROG_TRACEBACK:
  233.             traceblock = None
  234.             
  235.             try:
  236.                 (etype, value, traceback) = traceblock
  237.                 result = self.ReportError(etype, value, traceback, req = req, phase = req.phase, hname = hlist.handler, debug = debug)
  238.             finally:
  239.                 traceback = None
  240.  
  241.         except:
  242.             
  243.             try:
  244.                 (exc_type, exc_value, exc_traceback) = sys.exc_info()
  245.                 result = self.ReportError(exc_type, exc_value, exc_traceback, req = req, phase = req.phase, hname = hlist.handler, debug = debug)
  246.             finally:
  247.                 exc_traceback = None
  248.  
  249.  
  250.         return result
  251.  
  252.     
  253.     def ReportError(self, etype, evalue, etb, req = None, filter = None, srv = None, phase = 'N/A', hname = 'N/A', debug = 0):
  254.         """ 
  255. \tThis function is only used when debugging is on.
  256. \tIt sends the output similar to what you'd see
  257. \twhen using Python interactively to the browser
  258. \t"""
  259.         
  260.         try:
  261.             if str(etype) == 'exceptions.IOError' and str(evalue)[:5] == 'Write':
  262.                 debug = 0
  263.             
  264.             for e in traceback.format_exception(etype, evalue, etb):
  265.                 s = '%s %s: %s' % (phase, hname, e[:-1])
  266.                 if req:
  267.                     req.log_error(s, APLOG_NOERRNO | APLOG_ERR)
  268.                     continue
  269.                 _apache.log_error(s, APLOG_NOERRNO | APLOG_ERR, srv)
  270.             
  271.             if not debug or not req:
  272.                 return HTTP_INTERNAL_SERVER_ERROR
  273.             else:
  274.                 req.content_type = 'text/html'
  275.                 s = '\n<pre>\nMod_python error: "%s %s"\n\n' % (phase, hname)
  276.                 for e in traceback.format_exception(etype, evalue, etb):
  277.                     s = s + e + '\n'
  278.                 
  279.                 s = s + '</pre>\n'
  280.                 if filter:
  281.                     filter.write(s)
  282.                     filter.flush()
  283.                 else:
  284.                     req.write(s)
  285.                 return DONE
  286.         except:
  287.             traceback.print_exc()
  288.         finally:
  289.             etb = None
  290.  
  291.  
  292.  
  293.  
  294. def import_module(module_name, autoreload = 1, log = 0, path = None):
  295.     '''
  296.     Get the module to handle the request. If
  297.     autoreload is on, then the module will be reloaded
  298.     if it has changed since the last import.
  299.     '''
  300.     if sys.modules.has_key(module_name):
  301.         module = sys.modules[module_name]
  302.         file = module.__dict__.get('__file__')
  303.         if not file and path and not filter(file.startswith, path):
  304.             (mtime, oldmtime) = (0, -1)
  305.         elif autoreload:
  306.             oldmtime = module.__dict__.get('__mtime__', 0)
  307.             mtime = module_mtime(module)
  308.         else:
  309.             (mtime, oldmtime) = (0, 0)
  310.     else:
  311.         (mtime, oldmtime) = (0, -1)
  312.     if mtime > oldmtime:
  313.         if log:
  314.             if path:
  315.                 s = "mod_python: (Re)importing module '%s' with path set to '%s'" % (module_name, path)
  316.             else:
  317.                 s = "mod_python: (Re)importing module '%s'" % module_name
  318.             _apache.log_error(s, APLOG_NOERRNO | APLOG_NOTICE)
  319.         
  320.         parts = module_name.split('.')
  321.         for i in range(len(parts)):
  322.             (f, p, d) = imp.find_module(parts[i], path)
  323.             
  324.             try:
  325.                 mname = '.'.join(parts[:i + 1])
  326.                 module = imp.load_module(mname, f, p, d)
  327.             finally:
  328.                 if f:
  329.                     f.close()
  330.                 
  331.  
  332.             if hasattr(module, '__path__'):
  333.                 path = module.__path__
  334.                 continue
  335.         
  336.         if mtime == 0:
  337.             mtime = module_mtime(module)
  338.         
  339.         module.__mtime__ = mtime
  340.     
  341.     return module
  342.  
  343.  
  344. def module_mtime(module):
  345.     '''Get modification time of module'''
  346.     mtime = 0
  347.     if module.__dict__.has_key('__file__'):
  348.         filepath = module.__file__
  349.         
  350.         try:
  351.             if os.path.exists(filepath):
  352.                 mtime = os.path.getmtime(filepath)
  353.             
  354.             if os.path.exists(filepath[:-1]):
  355.                 mtime = max(mtime, os.path.getmtime(filepath[:-1]))
  356.         except OSError:
  357.             pass
  358.         except:
  359.             None<EXCEPTION MATCH>OSError
  360.         
  361.  
  362.     None<EXCEPTION MATCH>OSError
  363.     return mtime
  364.  
  365.  
  366. def resolve_object(module, object_str, arg = None, silent = 0):
  367.     """
  368.     This function traverses the objects separated by .
  369.     (period) to find the last one we're looking for:
  370.  
  371.        From left to right, find objects, if it is
  372.        an unbound method of a class, instantiate the
  373.        class passing the request as single argument
  374.  
  375.     'arg' is sometimes req, sometimes filter,
  376.     sometimes connection
  377.     """
  378.     obj = module
  379.     for obj_str in object_str.split('.'):
  380.         parent = obj
  381.         if silent and not hasattr(obj, obj_str):
  382.             return None
  383.         
  384.         if obj == module and not hasattr(module, obj_str):
  385.             if hasattr(module, '__file__'):
  386.                 s = "module '%s' contains no '%s'" % (module.__file__, obj_str)
  387.                 raise AttributeError, s
  388.             
  389.         
  390.         obj = getattr(obj, obj_str)
  391.         if hasattr(obj, 'im_self') and not (obj.im_self):
  392.             instance = parent(arg)
  393.             obj = getattr(instance, obj_str)
  394.             continue
  395.     
  396.     return obj
  397.  
  398.  
  399. def build_cgi_env(req):
  400.     '''
  401.     Utility function that returns a dictionary of
  402.     CGI environment variables as described in
  403.     http://hoohoo.ncsa.uiuc.edu/cgi/env.html
  404.     '''
  405.     req.add_common_vars()
  406.     env = req.subprocess_env.copy()
  407.     if len(req.path_info) > 0:
  408.         env['SCRIPT_NAME'] = req.uri[:-len(req.path_info)]
  409.     else:
  410.         env['SCRIPT_NAME'] = req.uri
  411.     env['GATEWAY_INTERFACE'] = 'Python-CGI/1.1'
  412.     if req.headers_in.has_key('authorization'):
  413.         env['HTTP_AUTHORIZATION'] = req.headers_in['authorization']
  414.     
  415.     return env
  416.  
  417.  
  418. class NullIO:
  419.     ''' Abstract IO
  420.     '''
  421.     
  422.     def tell(self):
  423.         return 0
  424.  
  425.     
  426.     def read(self, n = -1):
  427.         return ''
  428.  
  429.     
  430.     def readline(self, length = None):
  431.         return ''
  432.  
  433.     
  434.     def readlines(self):
  435.         return []
  436.  
  437.     
  438.     def write(self, s):
  439.         pass
  440.  
  441.     
  442.     def writelines(self, list):
  443.         self.write(''.join(list))
  444.  
  445.     
  446.     def isatty(self):
  447.         return 0
  448.  
  449.     
  450.     def flush(self):
  451.         pass
  452.  
  453.     
  454.     def close(self):
  455.         pass
  456.  
  457.     
  458.     def seek(self, pos, mode = 0):
  459.         pass
  460.  
  461.  
  462.  
  463. class CGIStdin(NullIO):
  464.     
  465.     def __init__(self, req):
  466.         self.pos = 0
  467.         self.req = req
  468.         self.BLOCK = 65536
  469.         self.buf = ''
  470.  
  471.     
  472.     def read(self, n = -1):
  473.         if n == 0:
  474.             return ''
  475.         
  476.         if n == -1:
  477.             s = self.req.read(self.BLOCK)
  478.             while s:
  479.                 self.buf = self.buf + s
  480.                 self.pos = self.pos + len(s)
  481.                 s = self.req.read(self.BLOCK)
  482.             result = self.buf
  483.             self.buf = ''
  484.             return result
  485.         elif self.buf:
  486.             s = self.buf[:n]
  487.             n = n - len(s)
  488.         else:
  489.             s = ''
  490.         s = s + self.req.read(n)
  491.         self.pos = self.pos + len(s)
  492.         return s
  493.  
  494.     
  495.     def readlines(self):
  496.         s = (self.buf + self.read()).split('\n')
  497.         return map((lambda s: s + '\n'), s)
  498.  
  499.     
  500.     def readline(self, n = -1):
  501.         if n == 0:
  502.             return ''
  503.         
  504.         self.buf = self.buf + self.req.read(self.BLOCK)
  505.         i = self.buf.find('\n')
  506.         while i == -1:
  507.             if n != -1 and len(self.buf) >= n:
  508.                 i = n - 1
  509.                 break
  510.             
  511.             x = len(self.buf)
  512.             self.buf = self.buf + self.req.read(self.BLOCK)
  513.             if len(self.buf) == x:
  514.                 i = x - 1
  515.                 break
  516.             
  517.             i = self.buf.find('\n', x)
  518.         result = self.buf[:i + 1]
  519.         self.buf = self.buf[i + 1:]
  520.         self.pos = self.pos + len(result)
  521.         return result
  522.  
  523.  
  524.  
  525. class CGIStdout(NullIO):
  526.     '''
  527.     Class that allows writing to the socket directly for CGI.
  528.     '''
  529.     
  530.     def __init__(self, req):
  531.         self.pos = 0
  532.         self.req = req
  533.         self.headers_sent = 0
  534.         self.headers = ''
  535.  
  536.     
  537.     def write(self, s):
  538.         if not s:
  539.             return None
  540.         
  541.         if not (self.headers_sent):
  542.             self.headers = self.headers + s
  543.             headers_over = 0
  544.             ss = self.headers.split('\r\n\r\n', 1)
  545.             if len(ss) < 2:
  546.                 ss = self.headers.split('\n\n', 1)
  547.                 if len(ss) >= 2:
  548.                     headers_over = 1
  549.                 
  550.             else:
  551.                 headers_over = 1
  552.             if headers_over:
  553.                 ss[0] = ss[0].replace('\r\n', '\n')
  554.                 lines = ss[0].split('\n')
  555.                 for line in lines:
  556.                     (h, v) = line.split(':', 1)
  557.                     v = v.strip()
  558.                     if h.lower() == 'status':
  559.                         status = int(v.split()[0])
  560.                         self.req.status = status
  561.                         continue
  562.                     if h.lower() == 'content-type':
  563.                         self.req.content_type = v
  564.                         self.req.headers_out[h] = v
  565.                         continue
  566.                     self.req.headers_out.add(h, v)
  567.                 
  568.                 self.headers_sent = 1
  569.                 self.req.write(ss[1])
  570.             
  571.         else:
  572.             self.req.write(str(s))
  573.         self.pos = self.pos + len(s)
  574.  
  575.     
  576.     def tell(self):
  577.         return self.pos
  578.  
  579.  
  580.  
  581. def setup_cgi(req):
  582.     '''
  583.     Replace sys.stdin and stdout with an objects that read/write to
  584.     the socket, as well as substitute the os.environ.
  585.     Returns (environ, stdin, stdout) which you must save and then use
  586.     with restore_nocgi().
  587.     '''
  588.     save_env = os.environ.copy()
  589.     si = sys.stdin
  590.     so = sys.stdout
  591.     os.environ.update(build_cgi_env(req))
  592.     sys.stdout = CGIStdout(req)
  593.     sys.stdin = CGIStdin(req)
  594.     sys.argv = []
  595.     return (save_env, si, so)
  596.  
  597.  
  598. def restore_nocgi(sav_env, si, so):
  599.     ''' see setup_cgi() '''
  600.     osenv = os.environ
  601.     for k in osenv.keys():
  602.         del osenv[k]
  603.     
  604.     for k in sav_env:
  605.         osenv[k] = sav_env[k]
  606.     
  607.     sys.stdout = si
  608.     sys.stdin = so
  609.  
  610.  
  611. def init():
  612.     ''' 
  613.         This function is called by the server at startup time
  614.     '''
  615.     return CallBack()
  616.  
  617. make_table = _apache.table
  618. log_error = _apache.log_error
  619. table = _apache.table
  620. config_tree = _apache.config_tree
  621. server_root = _apache.server_root
  622. mpm_query = _apache.mpm_query
  623. HTTP_CONTINUE = 100
  624. HTTP_SWITCHING_PROTOCOLS = 101
  625. HTTP_PROCESSING = 102
  626. HTTP_OK = 200
  627. HTTP_CREATED = 201
  628. HTTP_ACCEPTED = 202
  629. HTTP_NON_AUTHORITATIVE = 203
  630. HTTP_NO_CONTENT = 204
  631. HTTP_RESET_CONTENT = 205
  632. HTTP_PARTIAL_CONTENT = 206
  633. HTTP_MULTI_STATUS = 207
  634. HTTP_MULTIPLE_CHOICES = 300
  635. HTTP_MOVED_PERMANENTLY = 301
  636. HTTP_MOVED_TEMPORARILY = 302
  637. HTTP_SEE_OTHER = 303
  638. HTTP_NOT_MODIFIED = 304
  639. HTTP_USE_PROXY = 305
  640. HTTP_TEMPORARY_REDIRECT = 307
  641. HTTP_BAD_REQUEST = 400
  642. HTTP_UNAUTHORIZED = 401
  643. HTTP_PAYMENT_REQUIRED = 402
  644. HTTP_FORBIDDEN = 403
  645. HTTP_NOT_FOUND = 404
  646. HTTP_METHOD_NOT_ALLOWED = 405
  647. HTTP_NOT_ACCEPTABLE = 406
  648. HTTP_PROXY_AUTHENTICATION_REQUIRED = 407
  649. HTTP_REQUEST_TIME_OUT = 408
  650. HTTP_CONFLICT = 409
  651. HTTP_GONE = 410
  652. HTTP_LENGTH_REQUIRED = 411
  653. HTTP_PRECONDITION_FAILED = 412
  654. HTTP_REQUEST_ENTITY_TOO_LARGE = 413
  655. HTTP_REQUEST_URI_TOO_LARGE = 414
  656. HTTP_UNSUPPORTED_MEDIA_TYPE = 415
  657. HTTP_RANGE_NOT_SATISFIABLE = 416
  658. HTTP_EXPECTATION_FAILED = 417
  659. HTTP_UNPROCESSABLE_ENTITY = 422
  660. HTTP_LOCKED = 423
  661. HTTP_FAILED_DEPENDENCY = 424
  662. HTTP_INTERNAL_SERVER_ERROR = 500
  663. HTTP_NOT_IMPLEMENTED = 501
  664. HTTP_BAD_GATEWAY = 502
  665. HTTP_SERVICE_UNAVAILABLE = 503
  666. HTTP_GATEWAY_TIME_OUT = 504
  667. HTTP_VERSION_NOT_SUPPORTED = 505
  668. HTTP_VARIANT_ALSO_VARIES = 506
  669. HTTP_INSUFFICIENT_STORAGE = 507
  670. HTTP_NOT_EXTENDED = 510
  671.  
  672. try:
  673.     import syslog
  674.     APLOG_EMERG = syslog.LOG_EMERG
  675.     APLOG_ALERT = syslog.LOG_ALERT
  676.     APLOG_CRIT = syslog.LOG_CRIT
  677.     APLOG_ERR = syslog.LOG_ERR
  678.     APLOG_WARNING = syslog.LOG_WARNING
  679.     APLOG_NOTICE = syslog.LOG_NOTICE
  680.     APLOG_INFO = syslog.LOG_INFO
  681.     APLOG_DEBUG = syslog.LOG_DEBUG
  682. except ImportError:
  683.     APLOG_EMERG = 0
  684.     APLOG_ALERT = 1
  685.     APLOG_CRIT = 2
  686.     APLOG_ERR = 3
  687.     APLOG_WARNING = 4
  688.     APLOG_NOTICE = 5
  689.     APLOG_INFO = 6
  690.     APLOG_DEBUG = 7
  691.  
  692. APLOG_NOERRNO = 8
  693. OK = REQ_PROCEED = 0
  694. DONE = -2
  695. DECLINED = REQ_NOACTION = -1
  696. REMOTE_HOST = 0
  697. REMOTE_NAME = 1
  698. REMOTE_NOLOOKUP = 2
  699. REMOTE_DOUBLE_REV = 3
  700. REQ_ABORTED = HTTP_INTERNAL_SERVER_ERROR
  701. REQ_EXIT = 'REQ_EXIT'
  702. SERVER_RETURN = _apache.SERVER_RETURN
  703. PROG_TRACEBACK = 'PROG_TRACEBACK'
  704. FINFO_MODE = 0
  705. FINFO_INO = 1
  706. FINFO_DEV = 2
  707. FINFO_NLINK = 3
  708. FINFO_UID = 4
  709. FINFO_GID = 5
  710. FINFO_SIZE = 6
  711. FINFO_ATIME = 7
  712. FINFO_MTIME = 8
  713. FINFO_CTIME = 9
  714. FINFO_FNAME = 10
  715. FINFO_NAME = 11
  716. URI_SCHEME = 0
  717. URI_HOSTINFO = 1
  718. URI_USER = 2
  719. URI_PASSWORD = 3
  720. URI_HOSTNAME = 4
  721. URI_PORT = 5
  722. URI_PATH = 6
  723. URI_QUERY = 7
  724. URI_FRAGMENT = 8
  725. PROXYREQ_NONE = 0
  726. PROXYREQ_PROXY = 1
  727. PROXYREQ_REVERSE = 2
  728. M_GET = 0
  729. M_PUT = 1
  730. M_POST = 2
  731. M_DELETE = 3
  732. M_CONNECT = 4
  733. M_OPTIONS = 5
  734. M_TRACE = 6
  735. M_PATCH = 7
  736. M_PROPFIND = 8
  737. M_PROPPATCH = 9
  738. M_MKCOL = 10
  739. M_COPY = 11
  740. M_MOVE = 12
  741. M_LOCK = 13
  742. M_UNLOCK = 14
  743. M_VERSION_CONTROL = 15
  744. M_CHECKOUT = 16
  745. M_UNCHECKOUT = 17
  746. M_CHECKIN = 18
  747. M_UPDATE = 19
  748. M_LABEL = 20
  749. M_REPORT = 21
  750. M_MKWORKSPACE = 22
  751. M_MKACTIVITY = 23
  752. M_BASELINE_CONTROL = 24
  753. M_MERGE = 25
  754. M_INVALID = 26
  755. AP_REQ_ACCEPT_PATH_INFO = 0
  756. AP_REQ_REJECT_PATH_INFO = 1
  757. AP_REQ_DEFAULT_PATH_INFO = 2
  758. AP_MPMQ_NOT_SUPPORTED = 0
  759. AP_MPMQ_STATIC = 1
  760. AP_MPMQ_DYNAMIC = 2
  761. AP_MPMQ_MAX_DAEMON_USED = 1
  762. AP_MPMQ_IS_THREADED = 2
  763. AP_MPMQ_IS_FORKED = 3
  764. AP_MPMQ_HARD_LIMIT_DAEMONS = 4
  765. AP_MPMQ_HARD_LIMIT_THREADS = 5
  766. AP_MPMQ_MAX_THREADS = 6
  767. AP_MPMQ_MIN_SPARE_DAEMONS = 7
  768. AP_MPMQ_MIN_SPARE_THREADS = 8
  769. AP_MPMQ_MAX_SPARE_DAEMONS = 9
  770. AP_MPMQ_MAX_SPARE_THREADS = 10
  771. AP_MPMQ_MAX_REQUESTS_DAEMON = 11
  772. AP_MPMQ_MAX_DAEMONS = 12
  773.