Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benoitc/gunicorn
/ functions
Functions
5,599 in github.com/benoitc/gunicorn
⨍
Functions
5,599
◇
Types & classes
1,147
↳
Endpoints
142
↓ 2 callers
Function
_h2c_available
Whether cleartext HTTP/2 could apply to this server at all. Whether the h2 package is installed is checked once when the configuration is loa
gunicorn/http2/negotiation.py:56
↓ 2 callers
Method
_handle_connection
Main request handling loop using callback-based parser. Uses synchronous parsing in data_received(), avoiding the async overhead of p
gunicorn/asgi/protocol.py:1321
↓ 2 callers
Method
_handle_connection_terminated
Handle ConnectionTerminated event (GOAWAY frame). A graceful GOAWAY (NO_ERROR) with streams in flight puts the connection into draini
gunicorn/http2/connection.py:508
↓ 2 callers
Method
_handle_h1c_exception
Handle gunicorn_h1c exceptions with appropriate HTTP status codes. Returns True if the exception was handled, False otherwise.
gunicorn/asgi/protocol.py:964
↓ 2 callers
Method
_handle_http2_request
Handle a single HTTP/2 request with streaming support. Streams both request and response body chunks immediately, avoiding buffering
gunicorn/asgi/protocol.py:2504
↓ 2 callers
Method
_handle_sigchld
Handle SIGCHLD - reap dead workers.
gunicorn/dirty/arbiter.py:401
↓ 2 callers
Method
_handle_stream_reset
Handle StreamReset event (RST_STREAM frame). Args: event: StreamReset event
gunicorn/http2/connection.py:487
↓ 2 callers
Method
_handle_websocket
Handle WebSocket upgrade request.
gunicorn/asgi/protocol.py:1628
↓ 2 callers
Function
_int
(value, default, cap)
tests/docker/stress/apps/stress_app.py:40
↓ 2 callers
Method
_is_control_frame
PING, SETTINGS, or a DATA frame with no data that does not end its stream: frames that carry no request.
gunicorn/http2/connection.py:545
↓ 2 callers
Method
_is_valid_token
Check if data contains only RFC 9110 token characters.
gunicorn/asgi/parser.py:957
↓ 2 callers
Method
_keepalive_after
Whether the connection can be reused for another request. A body the application did not read leaves bytes on the socket, which would
gunicorn/workers/gthread.py:580
↓ 2 callers
Method
_line_limit
(self)
gunicorn/asgi/parser.py:537
↓ 2 callers
Method
_live_requests
Drop requests whose stream the peer already reset.
gunicorn/http2/connection.py:235
↓ 2 callers
Method
_load_model
Simulate loading a model (expensive operation).
examples/dirty_example/dirty_app.py:51
↓ 2 callers
Method
_make_stream
(self, headers)
tests/test_http2_request.py:385
↓ 2 callers
Function
_make_symlink
(tmp_path)
tests/test_reload.py:152
↓ 2 callers
Method
_next_chunk
Return the next payload, or None once the body is complete.
gunicorn/http2/request.py:48
↓ 2 callers
Method
_on_body
Callback: received body data chunk.
gunicorn/asgi/protocol.py:943
↓ 2 callers
Function
_owned_regular_file
A regular file owned by this user that nobody else can write.
gunicorn/dirty/pidfile.py:17
↓ 2 callers
Method
_parse_vars
Parse uWSGI vars block into key-value pairs. Format: key_size (2 bytes LE) + key + val_size (2 bytes LE) + value
gunicorn/uwsgi/message.py:121
↓ 2 callers
Method
_pause_reading
Pause reading from transport due to backpressure.
gunicorn/asgi/protocol.py:1170
↓ 2 callers
Method
_peer_is_trusted_proxy
Whether the peer may set forwarding and scheme headers.
gunicorn/http/message.py:204
↓ 2 callers
Method
_pop_chunk
Pop a chunk and return the appropriate message.
gunicorn/asgi/protocol.py:473
↓ 2 callers
Function
_post_request_hook
The post_request hook to call, or None for the default one, which does nothing.
gunicorn/asgi/protocol.py:593
↓ 2 callers
Method
_read_and_process
(self, data, waiting_stream_id=None)
gunicorn/http2/connection.py:257
↓ 2 callers
Method
_read_reader
(self, size)
gunicorn/http/body.py:245
↓ 2 callers
Function
_read_response
Read one complete chunked response and return its raw bytes.
tests/test_asgi_keepalive_timeout.py:64
↓ 2 callers
Function
_read_responses
Read until ``want`` chunked responses have arrived, EOF, or timeout.
tests/test_asgi_keepalive_pipeline.py:85
↓ 2 callers
Method
_response_forbids_content_length
(status)
gunicorn/http/wsgi.py:386
↓ 2 callers
Method
_response_forbids_content_length
Per RFC 9110 §6.4.2 a server MUST NOT send Content-Length on 1xx or 204 responses. HEAD and 304 are NOT covered: HEAD MAY include the
gunicorn/asgi/protocol.py:2215
↓ 2 callers
Method
_response_omits_body
(method, status)
gunicorn/http/wsgi.py:376
↓ 2 callers
Method
_restart_after_fork
Restart server in parent after fork (called by fork handler).
gunicorn/ctl/server.py:178
↓ 2 callers
Method
_resume_reading
Resume reading from transport.
gunicorn/asgi/protocol.py:1179
↓ 2 callers
Method
_run
(self, body)
tests/test_http2_h2c.py:1718
↓ 2 callers
Function
_run_informational
Send a 103 before or after the final response starts.
tests/test_asgi_response_headers.py:204
↓ 2 callers
Method
_send_manage_message
Send a worker management message to the dirty arbiter. Args: operation: "add" or "remove" count: Number of w
gunicorn/ctl/handlers.py:350
↓ 2 callers
Method
_serve
Main async serving loop.
gunicorn/workers/gasgi.py:161
↓ 2 callers
Method
_serve_http2_stream
Serve one stream, answering or resetting it whatever happens.
gunicorn/workers/gthread.py:621
↓ 2 callers
Function
_serve_two
Serve two pipelined GETs with an app that declares Content-Length: 5 and sends ``chunks`` as its body. Returns (written bytes, closed).
tests/test_asgi_keepalive_smuggling.py:193
↓ 2 callers
Method
_served_get
(self)
tests/test_http2_async_connection.py:1588
↓ 2 callers
Method
_shutdown
Initiate async shutdown.
gunicorn/dirty/worker.py:205
↓ 2 callers
Function
_sock_type
(addr)
gunicorn/sock.py:167
↓ 2 callers
Method
_start_worker_consumer
Start a consumer task for a worker's request queue.
gunicorn/dirty/arbiter.py:500
↓ 2 callers
Method
_strip_body_framing_headers
Remove framing headers that must not appear on a no-body response. Transfer-Encoding is always stripped (chunked framing implies a body
gunicorn/asgi/protocol.py:2224
↓ 2 callers
Function
_tree
(proc)
benchmarks/asgi/run.py:127
↓ 2 callers
Method
_unregister_worker
Unregister a worker's apps when it exits. Removes the worker from all tracking maps. Args: worker_pid: The PID
gunicorn/dirty/arbiter.py:218
↓ 2 callers
Function
_validate_response_headers
Reject response headers that would break HTTP/1.1 framing. Names must be tokens and values must not contain CR, LF or other control character
gunicorn/asgi/protocol.py:88
↓ 2 callers
Method
_wait_for_ready
Wait for gunicorn to be ready.
tests/docker/dirty_arbiter/test_parent_death.py:101
↓ 2 callers
Function
_wait_workers
Poll the worker count until ``predicate(count)`` holds or time runs out. Worker counts settle asynchronously after a signal, and the session stac
tests/docker/stress/test_resilience.py:23
↓ 2 callers
Method
abort_streams_nowait
Called by the protocol on connection loss.
gunicorn/http2/async_connection.py:510
↓ 2 callers
Method
acknowledge_data
Credit ``size`` consumed bytes back to the peer. Called by the stream as the application takes body data.
gunicorn/http2/connection.py:451
↓ 2 callers
Method
add_extra_file
(self, filename)
gunicorn/reloader.py:43
↓ 2 callers
Method
add_extra_file
(self, filename)
gunicorn/reloader.py:105
↓ 2 callers
Method
add_watch
(self, dirname, mask=None)
tests/test_reload.py:94
↓ 2 callers
Function
app
(environ, start_response)
gunicorn/util.py:661
↓ 2 callers
Method
apply
Apply the policy to the request's (lower-case bytes) headers. ``trust`` is _peer_trusted_for_forwarded() and ``secure_names`` is secu
gunicorn/asgi/protocol.py:147
↓ 2 callers
Function
assert_readline
(payload, size, expected)
tests/test_http.py:30
↓ 2 callers
Function
base_environ
(cfg)
gunicorn/http/wsgi.py:82
↓ 2 callers
Function
benchmark_arbiter_forwarding
Benchmark arbiter message forwarding throughput.
benchmarks/dirty_streaming.py:248
↓ 2 callers
Function
benchmark_async_client_streaming
Benchmark DirtyAsyncStreamIterator directly. Measures async iterator overhead vs raw message reading.
benchmarks/dirty_streaming.py:465
↓ 2 callers
Function
benchmark_async_vs_sync_client_streaming
Compare stream() vs stream_async() performance with the same workload.
benchmarks/dirty_streaming.py:582
↓ 2 callers
Function
benchmark_streaming_latency
Benchmark time-to-first-chunk and time-to-last-chunk.
benchmarks/dirty_streaming.py:285
↓ 2 callers
Function
benchmark_worker_streaming_throughput
Benchmark worker streaming throughput with various chunk sizes.
benchmarks/dirty_streaming.py:207
↓ 2 callers
Function
cfg_module
()
tests/test_config.py:23
↓ 2 callers
Function
check_environ
A context manager that asserts post-conditions of ``listen_fds`` at exit. This helper is used to ease checking of the test post-conditions f
tests/test_systemd.py:15
↓ 2 callers
Method
chunk
(self, size_hint=None)
gunicorn/http/unreader.py:96
↓ 2 callers
Method
close
Close the client connection.
gunicorn/dirty/stash.py:322
↓ 2 callers
Method
close
Close this stream normally.
gunicorn/http2/stream.py:282
↓ 2 callers
Method
close
(self)
tests/docker/per_app_allocation/app.py:152
↓ 2 callers
Function
create
Build the (response, environ) pair for a request. ``response_class`` and ``response_args`` let a protocol supply its own writer: HTTP/2 passe
gunicorn/http/wsgi.py:192
↓ 2 callers
Function
create_arbiter
Create a test arbiter for benchmarks.
benchmarks/dirty_streaming.py:147
↓ 2 callers
Method
create_worker
Create a worker instance for testing.
tests/test_gtornado.py:54
↓ 2 callers
Method
create_worker
Create a worker instance for testing.
tests/test_gtornado.py:92
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:139
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:184
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:226
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:465
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_asgi_worker.py:133
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_asgi_worker.py:229
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:660
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:943
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:1467
↓ 2 callers
Function
create_wsgi_config
Create a config for WSGI parsing.
benchmarks/http_parser_benchmark.py:79
↓ 2 callers
Method
debug
(self, msg, *args)
examples/dirty_example/test_worker_integration.py:30
↓ 2 callers
Function
decode_hex_escapes
Decode hex escape sequences like \\xAB in test data.
tests/treq_asgi.py:94
↓ 2 callers
Function
decode_hex_escapes
Decode hex escape sequences like \\xAB in test data.
tests/treq.py:54
↓ 2 callers
Function
default_environ
(req, sock, cfg)
gunicorn/http/wsgi.py:95
↓ 2 callers
Method
default_headers
(self)
gunicorn/http/wsgi.py:444
↓ 2 callers
Method
dirty_post_fork
(arbiter, worker)
gunicorn/config.py:3254
↓ 2 callers
Method
dirty_worker_exit
(arbiter, worker)
gunicorn/config.py:3292
↓ 2 callers
Method
dirty_worker_init
(worker)
gunicorn/config.py:3273
↓ 2 callers
Method
do_load_config
Loads the configuration
gunicorn/app/base.py:29
↓ 2 callers
Method
drain_body
Drain unread body data. Should be called before reusing connection for keepalive.
gunicorn/asgi/uwsgi.py:150
↓ 2 callers
Method
encode_chunk
Encode a chunk message for streaming responses. Args: request_id: Request identifier this chunk belongs to d
gunicorn/dirty/protocol.py:256
↓ 2 callers
Method
encode_end
Encode an end-of-stream message. Args: request_id: Request identifier this ends Returns: bytes: Com
gunicorn/dirty/protocol.py:274
↓ 2 callers
Method
encode_error
Encode an error response message. Args: request_id: Request identifier this responds to error: DirtyError in
gunicorn/dirty/protocol.py:225
↓ 2 callers
Method
encode_hybi
Encode a HyBi style WebSocket frame. Optional opcode: 0x0 - continuation 0x1 - text frame (base64 encode buf)
examples/websocket/gevent_websocket.py:162
↓ 2 callers
Method
encode_request
Encode a request message. Args: request_id: Unique request identifier (uint64) app_path: Import path of the
gunicorn/dirty/protocol.py:180
↓ 2 callers
Method
exception
(self, msg, *args, **kwargs)
gunicorn/glogging.py:294
← previous
next →
701–800 of 5,599, ranked by callers