module

Crit::Helpers::CGI

CGI helper module for git-http-backend integration

This module provides functionality to handle Git HTTP protocol by interfacing with git-http-backend CGI script.

Constants

Log = ::Log.for(self)

Set up a dedicated logger for CGI operations

Class methods

extract_username_from_auth_header(env)

Extracts username from HTTP Authorization header

@param env [HTTP::Server::Context] The HTTP context @return [String, Nil] The extracted username or nil if not found

Source
prepare_cgi_env(env, name, path_info)

Prepares CGI environment variables for git-http-backend

@param env [HTTP::Server::Context] The HTTP context @param name [String] Repository name @param path_info [String] Path info part of the URL @return [Hash(String, String)] CGI environment variables

Source
run_git_http_backend(env, cgi_env)

Runs git-http-backend CGI script

@param env [HTTP::Server::Context] The HTTP context @param cgi_env [Hash(String, String)] CGI environment variables @return [String] Empty string on success, error message on failure

Source