Skip to content

Conversation

@e5l
Copy link
Member

@e5l e5l commented Jun 23, 2022

Fix KTOR-4379

@e5l e5l self-assigned this Jun 23, 2022
@e5l e5l requested a review from rsinukov June 23, 2022 12:34
@e5l e5l force-pushed the e5l/validate-content-length branch from 4721952 to a36b62c Compare June 23, 2022 12:36
@rsinukov
Copy link

Please check CI

@e5l
Copy link
Member Author

e5l commented Jun 24, 2022

@rsinukov, thanks. done

@rsinukov
Copy link

JS and Native builds are still failing

@e5l e5l force-pushed the e5l/validate-content-length branch from 1a4b288 to 2996cbd Compare June 24, 2022 12:04
@e5l
Copy link
Member Author

e5l commented Jun 24, 2022

@rsinukov, thanks. Updated

Copy link

@rsinukov rsinukov left a comment

Choose a reason for hiding this comment

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

LGTM, but minor comments


if (!upgraded && event is LastHttpContent) {
current.close()
checkCurrentLengthAndClose()

Choose a reason for hiding this comment

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

Isn't it redundant, since this check is in finally block?

Copy link
Member Author

@e5l e5l Jun 27, 2022

Choose a reason for hiding this comment

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

Nope: the next message can be a new channel in the pipeline or upgrade

current?.close()
current = event
is ChannelEvent -> {
checkCurrentLengthAndClose()

Choose a reason for hiding this comment

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

same here

@e5l e5l merged commit 2fffabe into main Jun 27, 2022
@e5l e5l deleted the e5l/validate-content-length branch June 27, 2022 06:25
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.

3 participants