• Nathan Caza's avatar
    net/http: handle absolute paths in mapDirOpenError · a610957f
    Nathan Caza authored
    The current implementation does not account for Dir being
    initialized with an absolute path on systems that start
    paths with filepath.Separator. In this scenario, the
    original error is returned, and not checked for file
    segments.
    
    This change adds a test for this case, and corrects the
    behavior by ignoring blank path segments in the loop.
    
    Refs #18984
    
    Change-Id: I9b79fd0a73a46976c8e2feda0283ef0bb2b62ea1
    Reviewed-on: https://go-review.googlesource.com/36804Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    a610957f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...