Prevent mutation of default headers

This commit is contained in:
Richard Pringle 2020-08-19 10:24:20 -04:00
parent a2f2f448b3
commit 917b4fca77
No known key found for this signature in database
GPG Key ID: 2CA00483BAC621C3
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ export class Http2ServerCallStream<
this.metadataSent = true;
const custom = customMetadata ? customMetadata.toHttp2Headers() : null;
// TODO(cjihrig): Include compression headers.
const headers = Object.assign(defaultResponseHeaders, custom);
const headers = Object.assign({}, defaultResponseHeaders, custom);
this.stream.respond(headers, defaultResponseOptions);
}