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

Add HTTP POJA implementation based on Apache to the 4.10.x branch #779

Merged
merged 41 commits into from
Aug 20, 2024

Conversation

andriy-dmytruk
Copy link
Contributor

This is a copy of #773 but to 4.10.x branch, since this seems to be the latest branch. I can create a PR to revert the changes in 4.9.x afterwards.

micronaut-build and others added 30 commits August 20, 2024 09:32
This is currently using rawhttp as parser. I will change it soon to use a more widely used parser.

I am able to test a sample Micronaut application with this module. The sample can be found in samples/ dir along with its own README and build script.
I can see the app working both in interactive mode as well as inetd mode.

Here's the plan before PR is submitted:
1. Use a more widely used parser.
2. Add test cases and samples for http-serverless module.
3. Fix TODOs in code.
4. Run compatibility tests for micronaut.
5. Update gcn/micronaut launcher to allow users to select the new serverless option.
The test uses pipes to communicate with the server instead of STDIN and STDOUT and currently sends requests and receives responses as text, which can be improved.
- Add support for getting the body from the RawHttpRequest
- Add support for reading cookies from the request
- Add a LimitingInputStream to improve body support. The stream does not allow reading after content length has been read.
- Refactor into common base classes and specific RawHttp implementation that could be replaced.
- Fix the input stream reading for tests.
- Remove the transfer encoding header
- Make sure byte data is preserved
- Fix getting header that is missing
- Make the PojaHttpRequest mutable for filters.
- Make sure that headers are standardized to upper case.
- Allow binding byte[] body.
- Move the common testing logic to the http-poja-test module.
- Use limiting input stream on the whole body to make sure too many bytes are not read.
- Remove unneeded dependency.
- Fix for header reading.
- Fix for reading input stream by limiting it with content length.
Fix header standardization method and refactor header and query parameters to separate classes
Copy link

sonarcloud bot commented Aug 20, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
58.9% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@andriy-dmytruk andriy-dmytruk merged commit d5c230e into 4.10.x Aug 20, 2024
16 of 17 checks passed
@andriy-dmytruk andriy-dmytruk deleted the andriy/poja-apache branch August 20, 2024 16:07
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.

4 participants