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

fix: response headers serialization #248

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

ivan-tymoshenko
Copy link
Member

No description provided.

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the for const of is not nice?

lib/response.js Outdated
response._lightMyRequest.headers = Object.assign({}, response.getHeaders())
const headers = Object.assign({}, response.getHeaders())

for (const [name, value] of Object.entries(headers)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the performance of this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's pretty bad :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use Object.keys() instead.

@ivan-tymoshenko
Copy link
Member Author

I pushed a fixup commit. Idk where it is.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 23f4fa0 into master Jun 8, 2023
13 of 16 checks passed
@mcollina mcollina deleted the fix-response-headers-serialization branch June 8, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants