Skip to content

CDA-119: Content Length for getOne, getAll#1771

Open
zack-rma wants to merge 12 commits into
USACE:developfrom
zack-rma:bugfix/ratings-content-length
Open

CDA-119: Content Length for getOne, getAll#1771
zack-rma wants to merge 12 commits into
USACE:developfrom
zack-rma:bugfix/ratings-content-length

Conversation

@zack-rma

@zack-rma zack-rma commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updated getOne and getAll endpoints to properly report content length in response header.

Related Issue

Closes #1720

Validation

Included integration test for Ratings controller, as that was the original ask.

Checklist

  • AI tools used

@zack-rma zack-rma changed the title CDA-119: Ratings Content Length CDA-119: Content Length for getOne, getAll Jun 16, 2026
@zack-rma zack-rma marked this pull request as ready for review June 23, 2026 19:36
byte[] bytes = result.getBytes();
ctx.header(Header.CONTENT_LENGTH, String.valueOf(bytes.length));
ctx.res.getOutputStream().write(bytes);
} catch (IOException ex) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the exception handling centralized in ApiServlet? Why are these catch blocks needed in the controllers?

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.

Fetching a rating table doesn't return a content-length header

2 participants