mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
minor
Former-commit-id: 0bc9c92c519edda9e04be8481e16fd2fdcfc74c0
This commit is contained in:
@@ -3624,7 +3624,7 @@ type JSON struct {
|
||||
Indent string
|
||||
Prefix string
|
||||
ASCII bool // if true writes with unicode to ASCII content.
|
||||
Secure bool // if true then it adds a "while(1);" when Go slice (to JSON Array) value.
|
||||
Secure bool // if true then it prepends a "while(1);" when Go slice (to JSON Array) value.
|
||||
}
|
||||
|
||||
// JSONP contains the options for the JSONP (Context's) Renderer.
|
||||
|
||||
@@ -349,6 +349,10 @@ func (w *responseWriter) WriteTo(to ResponseWriter) {
|
||||
// the body is not copied, this writer doesn't support recording
|
||||
}
|
||||
|
||||
// ErrHijackNotSupported is returned by the Hijack method to
|
||||
// indicate that Hijack feature is not available.
|
||||
var ErrHijackNotSupported = errors.New("hijack is not supported by this ResponseWriter")
|
||||
|
||||
// Hijack lets the caller take over the connection.
|
||||
// After a call to Hijack(), the HTTP server library
|
||||
// will not do anything else with the connection.
|
||||
@@ -366,7 +370,7 @@ func (w *responseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
return h.Hijack()
|
||||
}
|
||||
|
||||
return nil, nil, errors.New("hijack is not supported by this ResponseWriter")
|
||||
return nil, nil, ErrHijackNotSupported
|
||||
}
|
||||
|
||||
// Flusher indicates if `Flush` is supported by the client.
|
||||
|
||||
Reference in New Issue
Block a user