• Brad Fitzpatrick's avatar
    net/http/httputil: rewrite flushing code, disable on Server-Sent Events · 5440bfc2
    Brad Fitzpatrick authored
    * Rewrite the flushing code to not use a persistent goroutine, which
      also simplifies testing.
    * Define the meaning of a negative flush interval. Its meaning doesn't
      change, but now it's locked in, and then we can use it to optimize
      the performance of the non-buffered case to avoid use of an AfterFunc.
    * Support (internal-only) special casing of FlushInterval values per
      request/response.
    * For now, treat Server-Sent Event responses as unbuffered. (or rather,
      immediately flushed from the buffer per-write)
    
    Fixes #27816
    
    Change-Id: Ie0f975c997daa3db539504137c741a96d7022665
    Reviewed-on: https://go-review.googlesource.com/c/137335
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDmitri Shuralyov <dmitshur@golang.org>
    5440bfc2
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...