Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ResponseLifecycle from core http-server #837

Draft
wants to merge 1 commit into
base: 4.13.x
Choose a base branch
from

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Nov 20, 2024

Instead of servlet-specific body encoding logic, use the ResponseLifecycle introduced in core by micronaut-projects/micronaut-core#11342 (pending review). Then we only have to take care of writing the ByteBody to the servlet response.

Some other related changes:

  • Improved async reading/writing support, deprecate StreamedServletMessage
  • Rework HttpResponse lifecycle management: Core mostly expects HttpResponseFactory to return new, independent responses, but servlet returned views of the same ServletHttpResponse each time (with shared headers and such). New approach is to have only the latest HttpResponse backed by the real ServletHttpResponse, any previous responses are copied snapshots
  • Deprecate and stop using ServletResponseEncoder, it is replaced by core ResponseBodyEncoder.

These changes fix all the remaining TCK failures that relate to response handling, except for FilterProxyTest.

Instead of servlet-specific body encoding logic, use the ResponseLifecycle introduced in core by micronaut-projects/micronaut-core#11342 (pending review). Then we only have to take care of writing the ByteBody to the servlet response.

Some other related changes:

- Improved async reading/writing support, deprecate StreamedServletMessage
- Rework HttpResponse lifecycle management: Core mostly expects HttpResponseFactory to return new, independent responses, but servlet returned views of the same ServletHttpResponse each time (with shared headers and such). New approach is to have only the latest HttpResponse backed by the real ServletHttpResponse, any previous responses are copied snapshots
- Deprecate and stop using ServletResponseEncoder, it is replaced by core ResponseBodyEncoder.

These changes fix all the remaining TCK failures that relate to response handling, except for FilterProxyTest.
@yawkat yawkat added the type: enhancement New feature or request label Nov 20, 2024
@yawkat yawkat added this to the 4.13.0 milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant