def __init__(self, path, command, channel, response, stdin=None, environ=None, globbing=None, recursive=0, size=None): # we need to store the globbing information to pass it # to the ZPublisher and the manage_FTPlist function # (ajung) self.globbing = globbing self.recursive = recursive if stdin is None: size = 0 stdin = StringIO() if environ is None: environ = self._get_env(path, command, channel, stdin, size) self._orig_env = environ HTTPRequest.__init__(self, stdin, environ, response, clean=1) # support for cookies and cookie authentication self.cookies = channel.cookies if '__ac' not in self.cookies and channel.userid != 'anonymous': self.other['__ac_name'] = channel.userid self.other['__ac_password'] = channel.password for k, v in self.cookies.items(): if k not in self.other: self.other[k] = v
def __init__(self, language=None): resp = HTTPResponse(stdout=sys.stdout) environ = {} environ['SERVER_NAME'] = 'foo' environ['SERVER_PORT'] = '80' environ['REQUEST_METHOD'] = 'GET' environ['SCRIPT_NAME'] = '/foo/test' environ['SESSION'] = None self.SESSION = {} HTTPRequest.__init__(self, None, environ, resp) if language: self.setLanguage(language)
def __init__(self,language=None): resp = HTTPResponse(stdout=sys.stdout) environ={} environ['SERVER_NAME']='foo' environ['SERVER_PORT']='80' environ['REQUEST_METHOD'] = 'GET' environ['SCRIPT_NAME']='/foo/test' environ['SESSION']=None self.SESSION={} HTTPRequest.__init__(self,None,environ,resp) if language: self.setLanguage(language)
def __init__(self, response, interval): stdin = StringIO() environ = self._get_env(stdin) HTTPRequest.__init__(self, stdin, environ, response, clean=1) self.other['interval'] = interval
def __init__(self, response, interval): stdin=StringIO() environ=self._get_env(stdin) HTTPRequest.__init__(self, stdin, environ, response, clean=1) self.other['interval'] = interval