You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Streaming through the REST API for a Realtime Database location from the Realtime Database Emulator is missing either a Content-Length, Transfer-Encoding, or Connection Header to tell the client when a connection is completed.
When making a cURL request with verbose mode on to the Realtime Database Emulator curl -v -X POST -H "Accept: text/event-stream" http://0.0.0.0/test.json
We receive Response Headers like
< HTTP/1.1 200 OK
< Content-Type: text/event-stream; charset=utf-8
< Cache-Control: no-cache
< Access-Control-Allow-Origin: *
< X-Firebase-Uuid: XXXXXX
< X-Firebase-Project-Id: XXXXX
< X-Firebase-Project-Number: 123456789
* no chunk, no close, no size. Assume close to signal end
Specifically we are given the warning * no chunk, no close, no size. Assume close to signal end
When making a similar cURL request with verbose mode on to a live Realtime Database project, we receive Response Headers like
See here that we do not receive this warning due to the inclusion of the < Connection: close header.
While the cURL response will return data and new events properly, not all HTTP clients make the same assumption that cURL is explicitly stating it is making. Other HTTP client implementations expect stricter adherence to the HTTP/1.1 protocol. When none of these headers appear, they assume that transmission is still ongoing and therefore only partially complete when in fact all the data had been sent by the server.
[REQUIRED] Steps to reproduce
Start the Realtime Database Emulator
Create a new entry at any path
From the CLI of your choosing, execute a Streaming HTTP request like curl -v -X POST -H "Accept: text/event-stream" http://0.0.0.0/<path_to_entry>.json
Capture response headers
[REQUIRED] Expected behavior
Expected behavior is to match production behavior and include Connection: close header in Streaming REST API response.
[REQUIRED] Actual behavior
No Connection: close header appears in the response.
The text was updated successfully, but these errors were encountered:
This is actually a pretty big issue for us on the GodotNuts team, as it requires we put in a pretty big hack to do an unfortunate back-reference to Firebase in our server-sent-events implementation, which otherwise has no reference to Firebase. It would be really helpful to us if this could get prioritized and fixed.
[REQUIRED] Environment info
firebase-tools:9.10.0
Platform:macOS
[REQUIRED] Test case
Streaming through the REST API for a Realtime Database location from the Realtime Database Emulator is missing either a Content-Length, Transfer-Encoding, or Connection Header to tell the client when a connection is completed.
When making a cURL request with verbose mode on to the Realtime Database Emulator
curl -v -X POST -H "Accept: text/event-stream" http://0.0.0.0/test.json
We receive Response Headers like
Specifically we are given the warning
* no chunk, no close, no size. Assume close to signal end
When making a similar cURL request with verbose mode on to a live Realtime Database project, we receive Response Headers like
See here that we do not receive this warning due to the inclusion of the
< Connection: close
header.While the cURL response will return data and new events properly, not all HTTP clients make the same assumption that cURL is explicitly stating it is making. Other HTTP client implementations expect stricter adherence to the HTTP/1.1 protocol. When none of these headers appear, they assume that transmission is still ongoing and therefore only partially complete when in fact all the data had been sent by the server.
[REQUIRED] Steps to reproduce
curl -v -X POST -H "Accept: text/event-stream" http://0.0.0.0/<path_to_entry>.json
[REQUIRED] Expected behavior
Expected behavior is to match production behavior and include
Connection: close
header in Streaming REST API response.[REQUIRED] Actual behavior
No
Connection: close
header appears in the response.The text was updated successfully, but these errors were encountered: