from ZServer import HTTPServer from ZServer.medusa.http_server import http_server,get_header, http_channel, VERSION_STRING from ZServer import DebugLogger from HTTPRequest import HTTPRequest from ZServer.HTTPResponse import make_response from zLOG import LOG, register_subsystem, BLATHER, INFO, WARNING, ERROR register_subsystem('HACKED ZServer HTTPServer') from ZServer.HTTPServer import CONTENT_LENGTH, CONNECTION, USER_AGENT, header2env class soap_zhttp_handler(HTTPServer.zhttp_handler): def continue_request(self, sin, request): """ continue handling request now that we have the stdin """ s=get_header(CONTENT_LENGTH, request.header) if s: s=int(s) else: s=0 DebugLogger.log('I', id(request), s) env=self.get_environment(request) zresponse=make_response(request,env) zresponse._http_connection = 'close' zrequest=HTTPRequest(sin, env, zresponse) request.channel.current_request=None request.channel.queue.append((self.module_name, zrequest, zresponse)) request.channel.work()