The functions framework contract indicates that the etag header should be omitted to prevent bad caching behavior, but the Node.js functions framework sets this header on error statuses.
Tested using curl in its verbose mode, the headers on the response are:
HTTP/2 500
content-type: text/plain; charset=utf-8
etag: W/"15-/6VXivhc2MKdLfIkLcUE47K6aH0"
x-cloud-trace-context: 148795d8e0aec48978d05ed0dab4dae4;o=1
date: Wed, 08 Feb 2023 23:43:55 GMT
server: Google Frontend
content-length: 21
Internal Server Error%
The functions framework contract indicates that the etag header should be omitted to prevent bad caching behavior, but the Node.js functions framework sets this header on error statuses.
Tested using curl in its verbose mode, the headers on the response are:
Interestingly, setting
etag
is already disabled https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/master/src/server.ts#L102 but it seems express is attaching an etag anyway.