File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ CHANGELOG
88 * Support root-level ` Generator ` in ` StreamedJsonResponse `
99 * Add ` UriSigner ` from the HttpKernel component
1010 * Add ` partitioned ` flag to ` Cookie ` (CHIPS Cookie)
11+ * Add argument ` bool $flush = true ` to ` Response::send() `
1112
12136.3
1314---
Original file line number Diff line number Diff line change @@ -415,13 +415,20 @@ public function sendContent(): static
415415 /**
416416 * Sends HTTP headers and content.
417417 *
418+ * @param bool $flush Whether output buffers should be flushed
419+ *
418420 * @return $this
419421 */
420- public function send (): static
422+ public function send (/* bool $flush = true */ ): static
421423 {
422424 $ this ->sendHeaders ();
423425 $ this ->sendContent ();
424426
427+ $ flush = 1 <= \func_num_args () ? func_get_arg (0 ) : true ;
428+ if (!$ flush ) {
429+ return $ this ;
430+ }
431+
425432 if (\function_exists ('fastcgi_finish_request ' )) {
426433 fastcgi_finish_request ();
427434 } elseif (\function_exists ('litespeed_finish_request ' )) {
You can’t perform that action at this time.
0 commit comments