/unit/test/python/iter_exception/ |
H A D | wsgi.py | 3 self.environ = environ 6 self.next = self.__next__ 8 def __iter__(self): argument 9 self.__i = 0 10 self._skip_level = int(self.environ.get('HTTP_X_SKIP', 0)) 14 self._is_chunked = self.environ.get('HTTP_X_CHUNKED') 33 return self 35 def __next__(self): argument 39 self.__i += 1 40 if self.__i > 2: [all …]
|
/unit/test/perl/body_io_fake/ |
H A D | IOFake.pm | 6 my $self = {}; 8 $self->{_count} = 2; 9 $self->{_errors} = $errors; 11 bless $self, $class; 12 return $self; 16 my $self = shift; 18 if ($self->{_count} > 0) { 19 return $self->{_count}--; 22 $self->{_errors}->print('IOFake getline() $/ is ' . ${ $/ }); 28 my $self = shift; [all …]
|
/unit/test/unit/ |
H A D | control.py | 8 def args_wrapper(self, *args): argument 25 arguments = (self, url) if conf is None else (self, conf, url) 34 def conf(self, conf, url): argument 35 return self.put(**self._get_args(url, conf))['body'] 38 def conf_get(self, url): argument 39 return self.get(**self._get_args(url))['body'] 42 def conf_delete(self, url): argument 43 return self.delete(**self._get_args(url))['body'] 46 def conf_post(self, conf, url): argument 47 return self.post(**self._get_args(url, conf))['body'] [all …]
|
H A D | http.py | 14 def http(self, start_str, **kwargs): argument 92 self.log_out(req, encoding) 112 self.log_in(resp) 141 def log_in(self, log): argument 163 def delete(self, **kwargs): argument 166 def get(self, **kwargs): argument 169 def head(self, **kwargs): argument 172 def post(self, **kwargs): argument 175 def put(self, **kwargs): argument 282 def _parse_json(self, resp): argument [all …]
|
H A D | option.py | 15 def __setattr__(self, name, value): argument 18 def __getattr__(self, name): argument
|
/unit/test/unit/applications/ |
H A D | tls.py | 10 def __init__(self): argument 12 self._default_context.check_hostname = False 13 self._default_context.verify_mode = ssl.CERT_NONE 15 def certificate(self, name='default', load=True): argument 16 self.openssl_conf() 37 self.certificate_load(name) 39 def certificate_load(self, crt, key=None): argument 49 def get_ssl(self, **kwargs): argument 53 def post_ssl(self, **kwargs): argument 93 def load(self, script, name=None): argument [all …]
|
H A D | websockets.py | 24 def key(self): argument 28 def accept(self, key): argument 32 def upgrade(self, headers=None): argument 36 key = self.key() 46 sock = self.get( 60 resp = self._resp_to_dict(resp) 65 def apply_mask(self, data, mask): argument 71 def frame_read(self, sock, read_timeout=60): argument 121 if frame['opcode'] == self.OP_CLOSE: 143 self, argument [all …]
|
H A D | proto.py | 10 def get_application_type(self): argument 15 return option.generated_tests.get(current_test, self.application_type) 17 def _load_conf(self, conf, **kwargs): argument 32 assert 'success' in self.conf(conf), 'load application configuration'
|
/unit/test/python/ctx_iter_atexit/ |
H A D | wsgi.py | 5 def __init__(self, environ, start_response): argument 6 self.environ = environ 7 self.start = start_response 9 def __iter__(self): argument 10 atexit.register(self._atexit) 12 content_length = int(self.environ.get('CONTENT_LENGTH', 0)) 13 body = bytes(self.environ['wsgi.input'].read(content_length)) 15 self.start( 23 def _atexit(self): argument 24 self.start('200', [('Content-Length', '0')])
|
/unit/test/python/close/ |
H A D | wsgi.py | 2 def __init__(self, environ, start_response): argument 3 self.environ = environ 4 self.start = start_response 6 def __iter__(self): argument 7 self.start('200', [(('Content-Length', '0'))]) 10 def close(self): argument 11 self.environ['wsgi.errors'].write('Close called.\n') 12 self.environ['wsgi.errors'].flush()
|
/unit/test/python/close_error/ |
H A D | wsgi.py | 2 def __init__(self, environ, start_response): argument 3 self.environ = environ 4 self.start = start_response 6 def __iter__(self): argument 7 self.start('200', [(('!', '0'))]) 10 def close(self): argument 11 self.environ['wsgi.errors'].write('Close called.\n') 12 self.environ['wsgi.errors'].flush()
|
/unit/test/unit/applications/lang/ |
H A D | node.py | 10 def __init__(self, application_type='node', es_modules=False): argument 11 self.application_type = application_type 12 self.es_modules = es_modules 14 def prepare_env(self, script): argument 28 def load(self, script, name='app.js', **kwargs): argument 29 self.prepare_env(script) 31 if self.es_modules: 44 self._load_conf(
|
H A D | ruby.py | 9 def __init__(self, application_type='ruby'): argument 10 self.application_type = application_type 12 def prepare_env(self, script): argument 20 def load(self, script, name='config.ru', **kwargs): argument 21 self.prepare_env(script) 26 "type": self.get_application_type(), 38 self._load_conf(
|
H A D | python.py | 10 def __init__(self, application_type='python', load_module='wsgi'): argument 11 self.application_type = application_type 12 self.load_module = load_module 14 def load(self, script, name=None, module=None, **kwargs): argument 19 module = self.load_module 38 "type": self.get_application_type(), 59 self._load_conf(
|
H A D | perl.py | 6 def __init__(self, application_type='perl'): argument 7 self.application_type = application_type 9 def load(self, script, name='psgi.pl', **kwargs): argument 12 self._load_conf( 17 "type": self.get_application_type(),
|
H A D | java.py | 12 def __init__(self, application_type='java'): argument 13 self.application_type = application_type 15 def prepare_env(self, script): argument 94 def load(self, script, **kwargs): argument 95 self.prepare_env(script) 98 self._load_conf( 104 "type": self.get_application_type(),
|
H A D | php.py | 9 def __init__(self, application_type='php'): argument 10 self.application_type = application_type 12 def load(self, script, index='index.php', **kwargs): argument 27 "type": self.get_application_type(), 43 self._load_conf(
|
H A D | go.py | 80 def load(self, script, name='app', **kwargs): argument 105 self._load_conf(conf, **kwargs)
|
/unit/test/python/threading/ |
H A D | wsgi.py | 9 def __init__(self, x): argument 10 self.__x = x 11 threading.Thread.__init__(self) 13 def log_index(self, index): argument 17 def run(self): argument 20 self.log_index(i) 23 self.log_index(i)
|
H A D | asgi.py | 9 def __init__(self, x): argument 10 self.__x = x 11 threading.Thread.__init__(self) 13 def log_index(self, index): argument 17 def run(self): argument 20 self.log_index(i) 23 self.log_index(i)
|
/unit/test/python/not_iterable/ |
H A D | wsgi.py | 2 def __init__(self, environ, start_response): argument 3 self.environ = environ 4 self.start = start_response 6 def __iter__(self): argument 7 self.start('200', [(('Content-Length', '0'))])
|
/unit/src/python/ |
H A D | nxt_python_asgi.h | 51 void nxt_py_asgi_dealloc(PyObject *self); 52 PyObject *nxt_py_asgi_await(PyObject *self); 53 PyObject *nxt_py_asgi_iter(PyObject *self); 54 PyObject *nxt_py_asgi_next(PyObject *self);
|
H A D | nxt_python_asgi_lifespan.c | 38 static PyObject *nxt_py_asgi_lifespan_send(PyObject *self, PyObject *dict); 47 static void nxt_py_asgi_lifespan_dealloc(PyObject *self); 403 nxt_py_asgi_lifespan_receive(PyObject *self, PyObject *none) in nxt_py_asgi_lifespan_receive() argument 409 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_receive() 447 nxt_py_asgi_lifespan_send(PyObject *self, PyObject *dict) in nxt_py_asgi_lifespan_send() argument 463 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_send() 589 nxt_py_asgi_lifespan_done(PyObject *self, PyObject *future) in nxt_py_asgi_lifespan_done() argument 596 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_done() 650 nxt_py_asgi_lifespan_dealloc(PyObject *self) in nxt_py_asgi_lifespan_dealloc() argument 652 nxt_py_asgi_lifespan_t *lifespan = (nxt_py_asgi_lifespan_t *)self; in nxt_py_asgi_lifespan_dealloc() [all …]
|
H A D | nxt_python_asgi_http.c | 34 static PyObject *nxt_py_asgi_http_receive(PyObject *self, PyObject *none); 36 static PyObject *nxt_py_asgi_http_send(PyObject *self, PyObject *dict); 44 static PyObject *nxt_py_asgi_http_done(PyObject *self, PyObject *future); 113 nxt_py_asgi_http_receive(PyObject *self, PyObject *none) in nxt_py_asgi_http_receive() argument 120 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_receive() 254 nxt_py_asgi_http_send(PyObject *self, PyObject *dict) in nxt_py_asgi_http_send() argument 264 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_send() 648 nxt_py_asgi_http_done(PyObject *self, PyObject *future) in nxt_py_asgi_http_done() argument 654 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_done()
|
/unit/src/ruby/ |
H A D | nxt_ruby_stream_io.c | 12 static VALUE nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self); 74 VALUE self; in nxt_ruby_stream_io_new() local 76 self = Data_Wrap_Struct(class, 0, 0, (void *) (uintptr_t) arg); in nxt_ruby_stream_io_new() 78 rb_obj_call_init(self, 0, NULL); in nxt_ruby_stream_io_new() 80 return self; in nxt_ruby_stream_io_new() 85 nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self) in nxt_ruby_stream_io_initialize() argument 87 return self; in nxt_ruby_stream_io_initialize()
|