Skip to content

Commit 426d279

Browse files
committed
Remove support for streaming responses for v1 callables.
1 parent 648b922 commit 426d279

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/common/providers/https.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,13 @@ function wrapOnCallHandler<Req = any, Res = any>(
782782
}
783783

784784
const acceptsStreaming = req.header("accept") === "text/event-stream";
785+
786+
if (acceptsStreaming && version === "gcfv1") {
787+
// streaming responses are not supported in v1 callable
788+
throw new HttpsError('invalid-argument', "Unsupported Accept header 'text/event-stream'")
789+
}
790+
791+
785792
const data: Req = decode(req.body.data);
786793
let result: Res;
787794
if (version === "gcfv1") {

0 commit comments

Comments
 (0)