Skip to content
  • Arti Zirk's avatar
    git-instaweb: add Python builtin http.server support · 2eb14bb2
    Arti Zirk authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    With this patch it is possible to launch git-instaweb by using
    Python http.server CGI handler via `-d python` option.
    
    git-instaweb generates a small wrapper around the http.server
    (in GIT_DIR/gitweb/) that address a limitation of the CGI handler
    where CGI scripts have to be in a cgi-bin subdirectory and
    directory index can't be easily changed. To keep the implementation
    small, gitweb is running on url `/cgi-bin/gitweb.cgi` and an automatic
    redirection is done when opening `/`.
    
    The generated wrapper is compatible with both Python 2 and 3.
    
    Python is by default installed on most modern Linux distributions
    which enables running `git instaweb -d python` without needing
    anything else.
    
    Signed-off-by: default avatarArti Zirk <arti.zirk@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    2eb14bb2