• Brad Fitzpatrick's avatar
    net/http: fix race in TimeoutHandler · 0478f7b9
    Brad Fitzpatrick authored
    New implementation of TimeoutHandler: buffer everything to memory.
    
    All or nothing: either the handler finishes completely within the
    timeout (in which case the wrapper writes it all), or it misses the
    timeout and none of it gets written, in which case handler wrapper can
    reliably print the error response without fear that some of the
    wrapped Handler's code already wrote to the output.
    
    Now the goroutine running the wrapped Handler has its own write buffer
    and Header copy.
    
    Document the limitations.
    
    Fixes #9162
    
    Change-Id: Ia058c1d62cefd11843e7a2fc1ae1609d75de2441
    Reviewed-on: https://go-review.googlesource.com/17752Reviewed-by: 's avatarDavid Symonds <dsymonds@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    0478f7b9
Name
Last commit
Last update
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...