Skip to content

Guard Jetty header writes against _fields NPE#1426

Open
lorlikowski-a11y wants to merge 3 commits intoUdashFramework:masterfrom
lorlikowski-a11y:Failed_to_handle_REST_request
Open

Guard Jetty header writes against _fields NPE#1426
lorlikowski-a11y wants to merge 3 commits intoUdashFramework:masterfrom
lorlikowski-a11y:Failed_to_handle_REST_request

Conversation

@lorlikowski-a11y
Copy link
Copy Markdown

Fixes intermittent NullPointerException in Jetty (Response.setContentType, _fields null) when REST response is written after timeout/recycle. We now ignore that specific NPE on header/content-type writes, keeping the rest of the response flow unchanged.

Why:
Jetty may recycle the response after timeout; header writes can throw NPE and fail the whole request.

Scope:
Minimal change in RestServlet.scala.

@lorlikowski-a11y
Copy link
Copy Markdown
Author

@BartlomiejMichalskiAV proszę przypisz @ddworak

Wrap HttpServletResponse/streams to ignore Jetty _fields NPE and keep response handling intact.
Stop writes after completion/commit, map NPE to 500, and log full stacktrace for diagnosis.
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.

1 participant