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
↓ 1 callers
Method
_has_invalid_header_chars
RFC 9110 section 5.5: only VCHAR, SP, HTAB, and obs-text allowed.
gunicorn/asgi/parser.py:969
↓ 1 callers
Function
_header
(scope, name)
tests/docker/stress/apps/stress_app.py:155
↓ 1 callers
Method
_heartbeat_loop
Periodically update heartbeat.
gunicorn/dirty/worker.py:282
↓ 1 callers
Function
_http
(scope, receive, send)
tests/docker/stress/apps/stress_app.py:173
↓ 1 callers
Function
_import_h2
Lazily import h2 library components.
gunicorn/http2/connection.py:35
↓ 1 callers
Function
_import_h2
Lazily import h2 library components.
gunicorn/http2/async_connection.py:35
↓ 1 callers
Method
_is_buffer_full
Check if internal buffers are full.
gunicorn/asgi/protocol.py:1162
↓ 1 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/async_connection.py:481
↓ 1 callers
Method
_is_listening
Whether ``sock`` already listens, as an inherited socket from systemd does. Calling listen() again on it can be denied (SELinux).
gunicorn/sock.py:64
↓ 1 callers
Method
_is_valid_method
Check if method is valid token with conventional restrictions.
gunicorn/asgi/parser.py:944
↓ 1 callers
Method
_keepalive_timeout
Called when keepalive timeout expires.
gunicorn/asgi/protocol.py:1204
↓ 1 callers
Function
_lifespan
(scope, receive, send)
tests/docker/stress/apps/stress_app.py:140
↓ 1 callers
Function
_load
(path)
benchmarks/asgi/report.py:26
↓ 1 callers
Function
_logconfig
(path, fmt)
tests/test_logger.py:100
↓ 1 callers
Function
_make_early_hints_callback
Create a wsgi.early_hints callback for sending 103 Early Hints. This allows WSGI applications to send 103 Early Hints responses before the fi
gunicorn/http/wsgi.py:123
↓ 1 callers
Method
_make_error_app
Create an error ASGI app for syntax errors during reload.
gunicorn/workers/gasgi.py:89
↓ 1 callers
Method
_maybe_resume_reading
(self)
tests/test_asgi_body_backpressure.py:102
↓ 1 callers
Function
_median
(values)
benchmarks/asgi/report.py:38
↓ 1 callers
Method
_on_headers_complete
Callback: request headers are complete.
gunicorn/asgi/protocol.py:905
↓ 1 callers
Function
_outcome
(fn)
tests/test_asgi_request_build.py:190
↓ 1 callers
Method
_pack_message
Pack the message inside ``00`` and ``FF`` As per the dataframing section (5.3) for the websocket spec
examples/websocket/gevent_websocket.py:293
↓ 1 callers
Function
_packet
(variables, body=b"")
tests/test_asgi_uwsgi_protocol.py:33
↓ 1 callers
Method
_parse_app_specs
Parse all app specifications from config. Populates self.app_specs with parsed information about each app, including the imp
gunicorn/dirty/arbiter.py:122
↓ 1 callers
Method
_parse_body
Parse Content-Length delimited body.
gunicorn/asgi/parser.py:804
↓ 1 callers
Method
_parse_chunked_body
Parse chunked transfer encoding.
gunicorn/asgi/parser.py:825
↓ 1 callers
Method
_parse_duration
Parse wrk duration string (e.g., '12.34ms', '1.23s') to ms.
benchmarks/dirty_benchmark.py:471
↓ 1 callers
Method
_parse_event
Parse an SSE event.
tests/docker/asgi_compliance/conftest.py:308
↓ 1 callers
Method
_parse_fast
Parse request using fast C parser (gunicorn_h1c >= 0.4.1).
gunicorn/http/message.py:550
↓ 1 callers
Method
_parse_headers
Parse headers, return True if headers are complete.
gunicorn/asgi/parser.py:621
↓ 1 callers
Method
_parse_messages
Parses for messages in the buffer *buf*. It is assumed that the buffer contains the start character for a message, but that it may c
examples/websocket/gevent_websocket.py:303
↓ 1 callers
Method
_parse_proxy_protocol
Parse PROXY protocol header if enabled. Returns True if parsing is complete (or not applicable), False if more data is needed.
gunicorn/asgi/parser.py:311
↓ 1 callers
Method
_parse_proxy_protocol_v1
Parse PROXY protocol v1 (text format). Returns buffer with v1 header consumed.
gunicorn/http/message.py:767
↓ 1 callers
Method
_parse_proxy_protocol_v1
Parse PROXY protocol v1 (text format). Format: PROXY <PROTO> <SRC_ADDR> <DST_ADDR> <SRC_PORT> <DST_PORT>\r\n
gunicorn/asgi/parser.py:336
↓ 1 callers
Method
_parse_proxy_protocol_v2
Parse PROXY protocol v2 (binary format). Returns buffer with v2 header consumed.
gunicorn/http/message.py:828
↓ 1 callers
Method
_parse_proxy_protocol_v2
Parse PROXY protocol v2 (binary format).
gunicorn/asgi/parser.py:407
↓ 1 callers
Method
_parse_python
Parse request using pure Python parser.
gunicorn/http/message.py:655
↓ 1 callers
Method
_parse_request_line
Parse request line, return True if complete.
gunicorn/asgi/parser.py:540
↓ 1 callers
Method
_parse_wrk_output
Parse wrk output to extract metrics.
benchmarks/dirty_benchmark.py:428
↓ 1 callers
Method
_pause_reading
(self)
gunicorn/asgi/websocket.py:143
↓ 1 callers
Function
_post
(*te_lines, extra=b"", body=b"")
tests/test_transfer_encoding.py:24
↓ 1 callers
Function
_proc_fd_count
Number of open fds for a process (Linux /proc).
tests/test_control_socket_integration.py:401
↓ 1 callers
Function
_proc_thread_count
Number of threads for a process (Linux /proc).
tests/test_control_socket_integration.py:406
↓ 1 callers
Method
_process_events
Run h2 events, oldest first, and return the new requests. Anything set aside during a flow-control wait arrived before this batch, so
gunicorn/http2/connection.py:327
↓ 1 callers
Method
_put_message
Queue a message for the app, waiting while too many are unread.
gunicorn/asgi/websocket.py:226
↓ 1 callers
Function
_query
(scope)
tests/docker/stress/apps/stress_app.py:150
↓ 1 callers
Method
_query_dirty_workers
Query the dirty arbiter for worker information. Connects to the dirty arbiter socket and sends a status request. Returns:
gunicorn/ctl/handlers.py:516
↓ 1 callers
Function
_rate
(summary, metric)
tests/docker/stress/test_stress.py:15
↓ 1 callers
Function
_read_body
(receive)
tests/docker/stress/apps/stress_app.py:163
↓ 1 callers
Method
_read_chunk
Read a chunk of data from the underlying stream. A lost or reset connection reads as EOF; other errors (including a misconfigured rea
gunicorn/asgi/unreader.py:107
↓ 1 callers
Method
_read_exact
Read exactly n bytes from internal buffer. Waits for data via the callback-fed buffer instead of StreamReader.
gunicorn/asgi/websocket.py:506
↓ 1 callers
Method
_read_frames
Read and process incoming WebSocket frames.
gunicorn/asgi/websocket.py:334
↓ 1 callers
Method
_read_next_chunk
Read the next message from the stream.
gunicorn/dirty/client.py:413
↓ 1 callers
Method
_read_next_chunk
Read the next message from the stream.
gunicorn/dirty/client.py:559
↓ 1 callers
Method
_recv_exactly
Receive exactly n bytes from a socket. Args: sock: Socket to read from n: Number of bytes to read R
gunicorn/dirty/protocol.py:492
↓ 1 callers
Function
_reference
The request fields as from_parser() computed them before.
tests/test_asgi_request_build.py:37
↓ 1 callers
Function
_register_fork_handlers
Register fork handlers once at module level.
gunicorn/ctl/server.py:37
↓ 1 callers
Function
_relay_result
Pass a finished task's outcome on to ``future`` unless it has one.
gunicorn/asgi/protocol.py:581
↓ 1 callers
Method
_response_omits_body
Return True when the response MUST NOT have a body (RFC 9110). Applies to HEAD requests and to status codes that semantically carry no body:
gunicorn/asgi/protocol.py:2202
↓ 1 callers
Method
_resume_reading
(self)
gunicorn/asgi/websocket.py:150
↓ 1 callers
Method
_run_async
Main async loop - start server, manage workers.
gunicorn/dirty/arbiter.py:346
↓ 1 callers
Method
_run_async
Main async loop - start server and handle connections.
gunicorn/dirty/worker.py:249
↓ 1 callers
Method
_run_lifespan
Run the ASGI lifespan protocol.
gunicorn/asgi/lifespan.py:138
↓ 1 callers
Function
_scan_response_headers
Validate response headers and find their framing fields, in one pass. Same checks as _validate_response_headers(). Returns (has_content_lengt
gunicorn/asgi/protocol.py:107
↓ 1 callers
Method
_send_accept
Send WebSocket handshake accept response.
gunicorn/asgi/websocket.py:290
↓ 1 callers
Method
_send_closing_frame
Sends the closing frame to the client, if required.
examples/websocket/gevent_websocket.py:393
↓ 1 callers
Method
_serve
Main async server loop.
gunicorn/ctl/server.py:206
↓ 1 callers
Method
_serve_http2_request
Run one HTTP/2 request, answering 500 rather than dropping it.
gunicorn/asgi/protocol.py:2480
↓ 1 callers
Method
_serve_http2_stream
Serve one stream, answering or resetting it whatever happens.
gunicorn/workers/base_async.py:224
↓ 1 callers
Method
_serve_http_request
Run one HTTP/1 request; return once its response is complete. The application may keep running after its last response message (Starl
gunicorn/asgi/protocol.py:1456
↓ 1 callers
Function
_serve_pipelined_unfinished
Serve two pipelined GETs. For ``/a`` the app sends ``messages`` and returns without a final ``more_body=False``; ``/b`` is answered normally.
tests/test_asgi_keepalive_smuggling.py:233
↓ 1 callers
Method
_served_get
(self)
tests/test_http2_async_connection.py:1547
↓ 1 callers
Method
_server_events
(self, client, client_sock)
tests/test_http2_connection.py:1807
↓ 1 callers
Method
_set_body_reader
Set up body state for async reading.
gunicorn/asgi/uwsgi.py:122
↓ 1 callers
Method
_set_handler
(self, log, output, fmt, stream=None)
gunicorn/glogging.py:438
↓ 1 callers
Method
_set_syslog_handler
(self, log, cfg, fmt, name)
gunicorn/glogging.py:462
↓ 1 callers
Function
_settings_payload_valid
Decode the base64url HTTP2-Settings payload and check its values.
gunicorn/http2/negotiation.py:204
↓ 1 callers
Method
_setup_callback_parser
Create callback parser based on http_parser setting. Parser selection: - auto: Use H1CProtocol if available (>= 0.4.1) and no incompa
gunicorn/asgi/protocol.py:823
↓ 1 callers
Method
_shutdown
Perform graceful shutdown.
gunicorn/workers/gasgi.py:228
↓ 1 callers
Function
_spin
(n=20)
tests/test_asgi_body_backpressure.py:33
↓ 1 callers
Function
_start
(variant, workers, port, root)
benchmarks/asgi/run.py:186
↓ 1 callers
Method
_start_control_server
\ Start the control socket server. The server runs in a background thread and accepts commands via Unix socket.
gunicorn/arbiter.py:1013
↓ 1 callers
Method
_start_http2_stream
Serve one stream in its own task.
gunicorn/asgi/protocol.py:2464
↓ 1 callers
Method
_start_request
Send the initial request to the arbiter.
gunicorn/dirty/client.py:392
↓ 1 callers
Method
_start_request
Send the initial request to the arbiter.
gunicorn/dirty/client.py:539
↓ 1 callers
Method
_start_uwsgi
Commit to the uWSGI protocol on this connection. uWSGI framing is pull-parsed from a StreamReader that data_received() feeds, so crea
gunicorn/asgi/protocol.py:747
↓ 1 callers
Function
_stop
(proc)
benchmarks/asgi/run.py:200
↓ 1 callers
Method
_stop_control_server
\ Stop the control socket server.
gunicorn/arbiter.py:1039
↓ 1 callers
Method
_stream_async_generator
Stream chunks from an asynchronous generator. Args: request_id: Request ID for the messages gen: Async gener
gunicorn/dirty/worker.py:417
↓ 1 callers
Method
_stream_sync_generator
Stream chunks from a synchronous generator. Args: request_id: Request ID for the messages gen: Sync generato
gunicorn/dirty/worker.py:369
↓ 1 callers
Method
_try_h2c_upgrade
Switch to HTTP/2 if this request asks to upgrade. Returns True when the connection has been taken over. Any HTTP/2 bytes the client p
gunicorn/workers/base_async.py:133
↓ 1 callers
Function
_unlink
(filename)
gunicorn/util.py:217
↓ 1 callers
Function
_upgrade_body_too_large
(req)
gunicorn/http2/negotiation.py:194
↓ 1 callers
Function
_valid_close_code
RFC 6455 section 7.4: codes a peer may send in a close frame.
gunicorn/asgi/websocket.py:64
↓ 1 callers
Function
_valid_websocket_key
RFC 6455 section 4.2.1: base64 of 16 bytes.
gunicorn/asgi/protocol.py:222
↓ 1 callers
Function
_wait_for_close
Return how long the server took to close the idle connection, or None.
tests/test_asgi_keepalive_timeout.py:75
↓ 1 callers
Method
_wait_for_data
Wait for body data to arrive via callback.
gunicorn/asgi/protocol.py:501
↓ 1 callers
Method
_wait_for_disconnect
Wait for connection to close after body is finished. This is needed for ASGI apps (like Django) that call receive() to listen for cli
gunicorn/asgi/protocol.py:530
↓ 1 callers
Method
_wait_for_flow_control_window
Wait for the stream's send window to become positive. The receive loop owns the reader; it processes the peer's WINDOW_UPDATE, SETTIN
gunicorn/http2/async_connection.py:657
↓ 1 callers
Method
_wait_for_ready
Wait for gunicorn to be ready and serving requests.
tests/docker/per_app_allocation/test_per_app_e2e.py:101
↓ 1 callers
Function
_wait_healthy
(timeout=180)
tests/docker/h2spec/conftest.py:43
← previous
next →
1,001–1,100 of 5,599, ranked by callers