Documentation ¶
Index ¶
- Constants
- func AllowResponseBuffering(w http.ResponseWriter)
- func CaptureAndFail(w http.ResponseWriter, r *http.Request, err error, msg string, code int)
- func CleanHeadersForRaven(r *http.Request)
- func CleanUpProcessGroup(cmd *exec.Cmd)
- func CloneRequestWithNewBody(r *http.Request, body []byte) *http.Request
- func DisableResponseBuffering(w http.ResponseWriter)
- func ExitStatus(err error) (int, bool)
- func Fail500(w http.ResponseWriter, r *http.Request, err error)
- func FixRemoteAddr(r *http.Request)
- func HTTPError(w http.ResponseWriter, r *http.Request, error string, code int)
- func HeaderClone(h http.Header) http.Header
- func IsApplicationJson(r *http.Request) bool
- func IsContentType(expected, actual string) bool
- func LogError(r *http.Request, err error)
- func OpenFile(path string) (file *os.File, fi os.FileInfo, err error)
- func ReadAllTempfile(r io.Reader) (tempfile *os.File, err error)
- func ReadRequestBody(w http.ResponseWriter, r *http.Request, maxBodySize int64) ([]byte, error)
- func RequestEntityTooLarge(w http.ResponseWriter, r *http.Request, err error)
- func SetForwardedFor(newHeaders *http.Header, originalRequest *http.Request)
- func SetNoCacheHeaders(header http.Header)
- func URLMustParse(s string) *url.URL
- type CountingResponseWriter
- type WriteFlusher
Constants ¶
View Source
const NginxResponseBufferHeader = "X-Accel-Buffering"
Variables ¶
This section is empty.
Functions ¶
func AllowResponseBuffering ¶ added in v1.1.0
func AllowResponseBuffering(w http.ResponseWriter)
func CaptureAndFail ¶
func CleanHeadersForRaven ¶ added in v0.8.3
func CleanUpProcessGroup ¶ added in v0.6.1
func CloneRequestWithNewBody ¶ added in v1.4.0
func DisableResponseBuffering ¶ added in v1.1.0
func DisableResponseBuffering(w http.ResponseWriter)
func ExitStatus ¶ added in v0.6.1
func FixRemoteAddr ¶
func IsApplicationJson ¶ added in v1.4.0
func IsContentType ¶ added in v1.3.0
func ReadAllTempfile ¶ added in v1.3.0
func ReadRequestBody ¶ added in v1.4.0
func RequestEntityTooLarge ¶ added in v1.4.0
func RequestEntityTooLarge(w http.ResponseWriter, r *http.Request, err error)
func SetForwardedFor ¶ added in v1.3.0
func SetNoCacheHeaders ¶
func URLMustParse ¶
Types ¶
type CountingResponseWriter ¶
type CountingResponseWriter interface { http.ResponseWriter Count() int64 Status() int }
func NewCountingResponseWriter ¶
func NewCountingResponseWriter(rw http.ResponseWriter) CountingResponseWriter
type WriteFlusher ¶ added in v1.4.0
func NewWriteAfterReader ¶ added in v1.4.0
Couple r and w so that until r has been drained (before r.Read() has returned some error), all writes to w are sent to a tempfile first. The caller must call Flush() on the returned WriteFlusher to ensure all data is propagated to w.
Click to show internal directories.
Click to hide internal directories.