fix #1783
This commit is contained in:
@@ -24,13 +24,11 @@ package context
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
@@ -195,14 +193,6 @@ func (r *Response) Write(p []byte) (int, error) {
|
||||
return r.ResponseWriter.Write(p)
|
||||
}
|
||||
|
||||
// Copy writes the data to the connection as part of an HTTP reply,
|
||||
// and sets `started` to true.
|
||||
// started means the response has sent out.
|
||||
func (r *Response) Copy(buf *bytes.Buffer) (int64, error) {
|
||||
r.Started = true
|
||||
return io.Copy(r.ResponseWriter, buf)
|
||||
}
|
||||
|
||||
// WriteHeader sends an HTTP response header with status code,
|
||||
// and sets `started` to true.
|
||||
func (r *Response) WriteHeader(code int) {
|
||||
|
||||
Reference in New Issue
Block a user