We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fe694c commit bdcdaf7Copy full SHA for bdcdaf7
modules/caddyhttp/encode/encode.go
@@ -307,6 +307,14 @@ func (rw *responseWriter) FlushError() error {
307
return http.NewResponseController(rw.ResponseWriter).Flush()
308
}
309
310
+// Flush calls FlushError() and simply discards any error. It is only implemented for backwards
311
+// compatibility with legacy code that does not use FlushError; we know at least one sponsor
312
+// needs this. It should not be relied upon as a stable part of the exported API, as it may be
313
+// removed in the future.
314
+func (rw *responseWriter) Flush() {
315
+ _ = rw.FlushError()
316
+}
317
+
318
// Write writes to the response. If the response qualifies,
319
// it is encoded using the encoder, which is initialized
320
// if not done so already.
0 commit comments