Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(674)

Issue 4239077: code review 4239077: http: add Flusher type; remove Flush from ResponseWriter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by bradfitz
Modified:
14 years ago
Reviewers:
CC:
rsc, bradfitzgoog, gburd, golang-dev
Visibility:
Public.

Description

http: add Flusher type; remove Flush from ResponseWriter The Flush functionality wasn't removed, but now you have to test if your ResponseWriter is also a Flusher: func ServeHTTP(rw http.ResponseWriter, req *http.Request) { if f, ok := rw.(http.Flusher); ok { f.Flush() } }

Patch Set 1 #

Patch Set 2 : diff -r 9da4e71e8f1b https://go.googlecode.com/hg #

Patch Set 3 : diff -r 9da4e71e8f1b https://go.googlecode.com/hg #

Patch Set 4 : diff -r d9ca86f7a44b https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -0 lines) Patch
M src/pkg/http/server.go View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4
bradfitz
Hello rsc (cc: gburd, golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
14 years ago (2011-03-09 18:10:14 UTC) #1
bradfitzgoog
It's telling that this CL is so short and no code in the Go tree ...
14 years ago (2011-03-09 18:20:10 UTC) #2
rsc
LGTM i'd move the extra lines on the Flush() method up into the main flusher ...
14 years ago (2011-03-09 18:24:07 UTC) #3
bradfitz
14 years ago (2011-03-09 18:24:55 UTC) #4
*** Submitted as 8392577a953b ***

http: add Flusher type; remove Flush from ResponseWriter

The Flush functionality wasn't removed, but now you have
to test if your ResponseWriter is also a Flusher:

func ServeHTTP(rw http.ResponseWriter, req *http.Request) {
   if f, ok := rw.(http.Flusher); ok {
       f.Flush()
   }
}

R=rsc, bradfitzwork
CC=gburd, golang-dev
http://codereview.appspot.com/4239077
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b