Medusa PCGI server.
This server functions as the PCGI publisher--it accepts the request
from the PCGI wrapper CGI program, services the request, and sends
back the response.
It should work with both inet and unix domain sockets.
Why would you want to use it? Using PCGI to connect to ZServer from
another webserver is similar to using the web server as a proxy,
with the difference, that the web server gets to control the
environment and headers completely.
Note that ZServer can operate multiple PCGI servers.
Imported modules
|
|
import DebugLogger
from Producers import ShutdownProducer, LoggingProducer, CallbackProducer
from PubCore import handle
from PubCore.ZEvent import Wakeup
from ZPublisher.HTTPRequest import HTTPRequest
from ZPublisher.HTTPResponse import HTTPResponse
from ZServer import CONNECTION_LIMIT
from cStringIO import StringIO
from medusa import asynchat, asyncore, logger
from medusa.asyncore import compact_traceback
from medusa.counter import counter
from medusa.http_server import compute_timezone_for_log
import os
import socket
import string
import sys
from tempfile import TemporaryFile
import time
from types import StringType, TupleType
|
Classes
|
|
PCGIChannel | Processes a PCGI request by collecting the env and stdin and
|
PCGIPipe | Formats a HTTP response in PCGI format
|
PCGIResponse | |
PCGIServer | Accepts PCGI requests and hands them off to the PCGIChannel for
|
|
|