module
Crit::Helpers::CGI
Overview
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.
Defined in:
helpers/cgi_helper.crConstant Summary
-
Log =
::Log.for(self)
-
Set up a dedicated logger for CGI operations
Class Method Summary
-
.extract_username_from_auth_header(env)
Extracts username from HTTP Authorization header
-
.prepare_cgi_env(env, name, path_info)
Prepares CGI environment variables for git-http-backend
-
.run_git_http_backend(env, cgi_env)
Runs git-http-backend CGI script
Class Method Detail
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
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
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