-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Handle the case of a bad request where it could not be parsed. The server should not break, but return a 400 response. Also implement other review comments.
andriy-dmytruk
force-pushed
the
andriy/poja-apache
branch
from
August 20, 2024 14:43
6ff8b94
to
b6e7e33
Compare
Quality Gate failedFailed conditions |
graemerocher
approved these changes
Aug 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.