• Brad Fitzpatrick's avatar
    net/http: fix confusing shadowing in ProxyFromEnvironment · 5b0bf9db
    Brad Fitzpatrick authored
    The old code worked, somewhat on accident, but was confusing,
    and had a useless assignment to the inner err. It worked
    because url.Parse parses just about anything, so the outer err
    was always nil, so it always fell through to the bottom return
    statement, even without the "err = nil" line.
    
    Instead, just have two return statements, and add a comment.
    
    R=golang-dev, r
    CC=golang-dev
    https://golang.org/cl/10448044
    5b0bf9db
Name
Last commit
Last update
api Loading commit data...
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...