• Yasuhiro Matsumoto's avatar
    http/cgi: clean up environment. · 048ec758
    Yasuhiro Matsumoto authored
    clean up duplicate environment for CGI.
    overriding former by latter.
    On windows, When there are duplicated environments like following,
    
    SCRIPT_FILENAME=c:/progra~1/php/php-cgi.exe
    SCRIPT_FILENAME=/foo.php
    
    CreateProcess use first entry.
    
    If make cgi.Handle like following,
    
            cgih = cgi.Handler{
                    Path: "c:/strawberry/perl/bin/perl.exe",
                    Dir:  "c:/path/to/webroot",
                    Root: "c:/path/to/webroot",
                    Args: []string{"foo.php"},
                    Env:  []string{"SCRIPT_FILENAME=foo.php"},
            }
    
    http/cgi should behave "SCRIPT_FILENAME is foo.php".
    But currently, http/cgi is set duplicate environment entries.
    So, browser show binary dump of "php-cgi.exe" that is specified indented
    SCRIPT_FILENAME in first entry.
    This change clean up duplicates, and use latters.
    
    R=golang-dev, bradfitz, bradfitz
    CC=golang-dev
    https://golang.org/cl/5010044
    048ec758
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...