module documentation

HTTP server for dulwich that implements the git smart HTTP protocol.

Class ChunkReader Undocumented
Class GunzipFilter WSGI middleware that unzips gzip-encoded requests before passing on to the underlying application.
Class HTTPGitApplication Class encapsulating the state of a git WSGI application.
Class HTTPGitRequest Class encapsulating the state of a single git HTTP request.
Class LimitedInputFilter WSGI middleware that limits the input length of a request to that specified in Content-Length.
Class ServerHandlerLogger ServerHandler that uses dulwich's logger for logging exceptions.
Class WSGIRequestHandlerLogger WSGIRequestHandler that uses dulwich's logger for logging exceptions.
Class WSGIServerLogger No class docstring; 1/1 method documented
Function cache_forever_headers Undocumented
Function date_time_string Undocumented
Function get_idx_file Undocumented
Function get_info_packs Undocumented
Function get_info_refs Undocumented
Function get_loose_object Undocumented
Function get_pack_file Undocumented
Function get_repo Get a Repo instance for the given backend and URL regex match.
Function get_text_file Undocumented
Function handle_service_request Undocumented
Function main Entry point for starting an HTTP git server.
Function make_wsgi_chain Factory function to create an instance of HTTPGitApplication, correctly wrapped with needed middleware.
Function send_file Send a file-like object to the request output.
Function url_prefix Extract the URL prefix from a regex match.
Constant HTTP_ERROR Undocumented
Constant HTTP_FORBIDDEN Undocumented
Constant HTTP_NOT_FOUND Undocumented
Constant HTTP_OK Undocumented
Constant NO_CACHE_HEADERS Undocumented
Variable logger Undocumented
Class _LengthLimitedFile Wrapper class to limit the length of reads from a file-like object.
Function _chunk_iter Undocumented
Function _url_to_path Undocumented
def cache_forever_headers(now=None):

Undocumented

def date_time_string(timestamp=None):

Undocumented

Parameters
timestamp:Optional[float]Undocumented
Returns
strUndocumented
def get_idx_file(req, backend, mat):

Undocumented

def get_info_packs(req, backend, mat):

Undocumented

def get_info_refs(req, backend, mat):

Undocumented

def get_loose_object(req, backend, mat):

Undocumented

def get_pack_file(req, backend, mat):

Undocumented

def get_repo(backend, mat):

Get a Repo instance for the given backend and URL regex match.

Returns
BaseRepoUndocumented
def get_text_file(req, backend, mat):

Undocumented

def handle_service_request(req, backend, mat):

Undocumented

def main(argv=sys.argv):

Entry point for starting an HTTP git server.

def make_wsgi_chain(*args, **kwargs):

Factory function to create an instance of HTTPGitApplication, correctly wrapped with needed middleware.

def send_file(req, f, content_type):

Send a file-like object to the request output.

Returns: Iterator over the contents of the file, as chunks.

Parameters
reqThe HTTPGitRequest object to send output to.
fAn open file-like object to send; will be closed.
content_typeThe MIME type for the file.
def url_prefix(mat):

Extract the URL prefix from a regex match.

Returns: The URL prefix, defined as the text before the match in the
original string. Normalized to start with one leading slash and end with zero.
Parameters
matA regex match object.
Returns
strUndocumented
HTTP_ERROR: str =

Undocumented

Value
'500 Internal Server Error'
HTTP_FORBIDDEN: str =

Undocumented

Value
'403 Forbidden'
HTTP_NOT_FOUND: str =

Undocumented

Value
'404 Not Found'
HTTP_OK: str =

Undocumented

Value
'200 OK'
NO_CACHE_HEADERS: list =

Undocumented

Value
[('Expires', 'Fri, 01 Jan 1980 00:00:00 GMT'),
 ('Pragma', 'no-cache'),
 ('Cache-Control', 'no-cache, max-age=0, must-revalidate')]
logger =

Undocumented

def _chunk_iter(f):

Undocumented

def _url_to_path(url):

Undocumented