Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error response headers should not include etag #516

Closed
garethgeorge opened this issue Feb 13, 2023 · 0 comments
Closed

Error response headers should not include etag #516

garethgeorge opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working P3

Comments

@garethgeorge
Copy link
Contributor

garethgeorge commented Feb 13, 2023

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%

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.

@garethgeorge garethgeorge changed the title Error response headers include etag Error response headers should not include etag Feb 13, 2023
@josephlewis42 josephlewis42 added bug Something isn't working P3 labels May 22, 2023
@garethgeorge garethgeorge self-assigned this Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

2 participants