Skip to content

Undertow throws exception when TUS tries to respond with 409 or some other error status #40

@OverDrone

Description

@OverDrone

CoreDefaultResponseHeadersHandler always writes header Content-Length=0
If some error detected, like incorrect offset, TUS calls HttpServletResponse.sendError() with some message. In other words there is nonempty response with header Content-Length=0. Undertow throws exception, probably because it allocates output buffer based on Content-Length header.

How to fix:

Remove setting Content-Length=0 from CoreDefaultResponseHeadersHandler.
Or overwrite Content-Length header before calling HttpServletResponse.sendError()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions