Skip to main content

Module http_options

Module http_options 

Source
Expand description

Read git’s http.<key> and http.<url>.<key> settings.

Mirrors the small subset upstream consults when wiring TLS into its HTTP client. URL-specific overrides (http.<url>.<key>) are resolved by longest prefix match against the request URL, the same way git itself routes them.

TLS surface is intentionally narrow (CA bundle, verify toggle, the client-cert pair for mTLS). The same URL-prefix machinery is reused for http.extraHeader (multi-value, applied to every request), the Netscape-format http.cookieFile, and the LFS-namespace boolean lfs.<url>.contenttype. Remaining surface (e.g. sslCertPasswordProtected) is deferred.

Structs§

HttpOptions

Functions§

extra_headers_for
Every http.<...>.extraHeader and global http.extraHeader value whose URL part matches url, parsed into (Name, Value) pairs.
lfs_url_bool
Resolve lfs.<url>.<subkey> with longest URL-prefix match, falling back to global lfs.<subkey>. Same machinery as HttpOptions::for_url but for the lfs namespace. default is returned when neither scope has the key set.