Skip to content

Fix websocket examples - #9757

Merged
normanmaurer merged 1 commit into
netty:4.1from
amizurov:feature/fix_ws_example
Nov 6, 2019
Merged

normanmaurer merged 1 commit into
netty:4.1from
amizurov:feature/fix_ws_example

Conversation

@amizurov

@amizurov amizurov commented Nov 5, 2019

Copy link
Copy Markdown
Contributor

Motivation:

After fix #9377 some websocket examples work incorrect

Modification:

Replace Unpooled.EMPTY_BUFFER to ctx.alloc().buffer(0) for responses with possible content

@netty-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@normanmaurer

Copy link
Copy Markdown
Member

@amizurov can you explain what exactly not works anymore ?

@amizurov

amizurov commented Nov 5, 2019

Copy link
Copy Markdown
Contributor Author

@amizurov can you explain what exactly not works anymore ?

When called sendHttpResponse(ctx, req, res) and response is not 200 OK we try to write content with response status, but Unpooled#EMPTY_BUFFER does not allow to do this and throws an java.lang.IndexOutOfBoundsException.

@normanmaurer

Copy link
Copy Markdown
Member

I see

@normanmaurer

Copy link
Copy Markdown
Member

@netty-bot test this please

@normanmaurer
normanmaurer merged commit 042b51a into netty:4.1 Nov 6, 2019
@normanmaurer

Copy link
Copy Markdown
Member

@amizurov thanks a lot.

@normanmaurer normanmaurer added this to the 4.1.44.Final milestone Nov 6, 2019
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