class documentation

Class encapsulating the state of a single git HTTP request.

Method __init__ Initialize HTTPGitRequest.
Method add_header Add a header to the response.
Method cache_forever Set the response to be cached forever by the client.
Method error Begin a HTTP 500 response and return the text of a message.
Method forbidden Begin a HTTP 403 response and return the text of a message.
Method nocache Set the response to never be cached by the client.
Method not_found Begin a HTTP 404 response and return the text of a message.
Method respond Begin a response with the given status and other headers.
Instance Variable dumb Undocumented
Instance Variable environ the WSGI environment for the request.
Instance Variable handlers Undocumented
Instance Variable _cache_headers Undocumented
Instance Variable _headers Undocumented
Instance Variable _start_response Undocumented
def __init__(self, environ: WSGIEnvironment, start_response: StartResponse, dumb: bool = False, handlers: dict[bytes, HandlerConstructor | Callable[..., Any]] | None = None):

Initialize HTTPGitRequest.

Parameters
environ:WSGIEnvironmentWSGI environment dictionary
start_response:StartResponseWSGI start_response callable
dumb:boolWhether to use dumb HTTP protocol
handlers:dict[bytes, HandlerConstructor | Callable[..., Any]] | NoneOptional handler overrides
def add_header(self, name: str, value: str):

Add a header to the response.

def cache_forever(self):

Set the response to be cached forever by the client.

def error(self, message: str) -> bytes:

Begin a HTTP 500 response and return the text of a message.

def forbidden(self, message: str) -> bytes:

Begin a HTTP 403 response and return the text of a message.

def nocache(self):

Set the response to never be cached by the client.

def not_found(self, message: str) -> bytes:

Begin a HTTP 404 response and return the text of a message.

def respond(self, status: str = HTTP_OK, content_type: str | None = None, headers: Sequence[tuple[str, str]] | None = None) -> Callable[[bytes], object]:

Begin a response with the given status and other headers.

dumb =

Undocumented

environ =

the WSGI environment for the request.

handlers =

Undocumented

_cache_headers: list[tuple[str, str]] =

Undocumented

_headers: list[tuple[str, str]] =

Undocumented

_start_response =

Undocumented