Skip to content

Conversation

p8
Copy link
Member

@p8 p8 commented May 28, 2020

Since rack 2.1.0 the Content-Length header is no longer updated for
if the body argument isn't a string. This was done for performance
reasons. It is recommended to set Content-Length header in the
middlewate instead.

See: rack/rack#1472 (comment)

This fixes the build.

# the body. Otherwise the response will be truncated.
@headers.delete("Content-Length")
# Set Content-Length header to the size of the current body
# + the extra conent. Otherwise the response will be truncated.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# + the extra conent. Otherwise the response will be truncated.
# + the extra content. Otherwise the response will be truncated.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 Fixed the comment.

Since rack 2.1.0 the Content-Length header is no longer updated for
if the body argument isn't a string. This was done for performance
reasons. It is recommended to set Content-Length header in the
middlewate instead.

rack/rack#1472 (comment)
@p8 p8 force-pushed the fix-for-rack-2.1.0 branch from add5e3f to bcd7776 Compare May 28, 2020 20:44
@rafaelfranca rafaelfranca merged commit d9fd6d2 into rails:master May 28, 2020
@p8 p8 deleted the fix-for-rack-2.1.0 branch May 28, 2020 20:54
mishina2228 added a commit to mishina2228/web-console that referenced this pull request Jun 8, 2022
mishina2228 added a commit to mishina2228/web-console that referenced this pull request Jun 9, 2022
patrickm68 added a commit to patrickm68/web-console that referenced this pull request Dec 1, 2022
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