httpd

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: 0BSD Imports: 61 Imported by: 0

Documentation

Overview

Package httpd serves the HTTP listener: anonymous smart-HTTP git reads for public repositories, and (from M5) the web UI. There is no authentication on this listener by design — private repositories answer 404 everywhere, and pushes are refused with a pkt-line ERR so no git version ever falls back to asking for credentials.

Index

Constants

View Source
const PagesBranch = "refs/heads/pages"

PagesBranch is the branch a repo publishes as its static site.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Method  string
	Pattern string // without method prefix
	// Mutating marks routes that can change server state. The git transport
	// POSTs are not mutating: upload-pack is a pure read, and the
	// receive-pack endpoint is a static refusal that writes nothing.
	Mutating bool
	Handler  http.HandlerFunc
}

Route is one entry in the explicit route table. The view-only guarantee is structural: Handler() consults web.mode when building the table, and the route test asserts no mutating route exists in view_only mode.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config, st *store.Store) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Routes

func (s *Server) Routes() []Route

Routes returns the route table for the configured web.mode.

Source Files

  • account.go
  • accounts.go
  • activity.go
  • admin.go
  • api.go
  • apilimit.go
  • apiread.go
  • badge.go
  • badgepng.go
  • builds.go
  • compare.go
  • control.go
  • diff.go
  • facts.go
  • feed.go
  • filters.go
  • flash.go
  • healthz.go
  • issueactions.go
  • langs.go
  • lfs.go
  • mractions.go
  • notifyweb.go
  • orgweb.go
  • page.go
  • pages.go
  • readme.go
  • releaseactions.go
  • routes.go
  • searchweb.go
  • settings.go
  • smart.go
  • web.go
  • wiki.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL