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

refactor: more readable #132

Merged
merged 1 commit into from
Jan 29, 2024
Merged

refactor: more readable #132

merged 1 commit into from
Jan 29, 2024

Conversation

jarqvi
Copy link
Contributor

@jarqvi jarqvi commented Jan 29, 2024

I've made some slight adjustments to enhance readability.

) {
outgoing.writeHead(res.status, resHeaderRecord)

await writeFromReadableStream(res.body, outgoing)
} else {
const buffer = await res.arrayBuffer()
resHeaderRecord['content-length'] = buffer.byteLength
Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I don't need to use the contentLength variable here
Because the content-length in resHeaderRecord should have changed.

Copy link
Member

Choose a reason for hiding this comment

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

This is needed.

@yusukebe
Copy link
Member

@jarqvi Thanks. Merge now.

@yusukebe yusukebe merged commit f2b851c into honojs:main Jan 29, 2024
3 checks passed
@jarqvi jarqvi deleted the more-readable branch January 29, 2024 19:19
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.

2 participants