Skip to content

Assets don't work on HTTPS with Netty #621

@nielsavonds

Description

@nielsavonds

When using Netty, file assets don't work when using HTTPS.

The problem is in the NettyResponse, on this line:
ctx.write(new DefaultFileRegion(channel, offset, count));
The DefaultFileRegion will be sent to the pipeline and first passes through the HttpObjectEncoder. This one will not do any conversion on a FileRegion.
Next the message is passed on to the SslHandler. This one checks if the message is a ByteBuf and otherwise simply returns failure.

Thus, only the header is sent out for assets over HTTPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions