Skip to content

EOFException from server code is incorrectly assumed to indicate a client disconnect and is swallowed #35778

@sddavis

Description

@sddavis

Overview

I have an application that allows users to upload a JSON file and parses it using Gson. If the file is invalid, Gson may throw a java.io.EOFException.

Starting with Spring Framework 6.2, due to 9252e74, Spring assumes this means the client disconnected and swallows the exception, returning a 200 response and breaking client-side error handling.

To work around this, I would need to handle EOFException in every place that can throw it, replacing it with a different exception.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: waiting-for-triageAn issue we've not yet triaged or decided on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions