| Summary: | Shutdown request should return valid JSON | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ivan Furnadjiev <ivan> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | mpost, rsternberg | ||||||
| Version: | 2.2 | ||||||||
| Target Milestone: | 2.2 RC2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 237847 [details]
Proposed patch
With this patch the "shutdown" request returns empty JSON message (with empty head and operations).
Comment on attachment 237847 [details]
Proposed patch
I'm fine with the change. But shouldn't we use
new ProtocolMessageWriter().createMessage().writeTo( response.getWriter() );
instead of assembling the message manually?
(In reply to comment #2) > new ProtocolMessageWriter().createMessage().writeTo( response.getWriter() ); I thought about it too, but ProtocolMessageWriter is doing some internal checks which I decided to skip. I will update the patch with your proposal. Created attachment 237848 [details] Updated patch with suggestion from comment #2 Comment on attachment 237848 [details] Updated patch with suggestion from comment #2 Although it's not a critical bug, I'm in favor of including this fix in 2.2, because it removes an exceptional case that third-party clients need to handle. Applied patch to master with commit 3cc3cfb85d07868980a2019e496234f43e71148a. |
Currently, the last shutdown request ( with { "head" : { "shutdown":true } ... } ) returns empty page even the content type is set to "application/json". We should return empty JSON object.