Adds response_body to configuration options#163
Open
excalq wants to merge 3 commits intologstash-plugins:mainfrom
Open
Adds response_body to configuration options#163excalq wants to merge 3 commits intologstash-plugins:mainfrom
excalq wants to merge 3 commits intologstash-plugins:mainfrom
Conversation
This file contains hidden or 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
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.
Adds a new config option:
response_body, which keeps the current (String)okas the default. This is useful for being able to issue a JSON response to clients.Additionally, the
response_headersdefaultContent-Typeis now lowercased, as is expected by the Netty HTTP library, and by HTTP/2.x. HTTP/1.x is case-insensitive.I've tested this via
gradlebuild, vendor,bundleand loading the resulting gem into a local Docker-Compose stack, in which Postman shows the hot-reloaded change fromokto{"ok": true}. Setting response headers also appear in Postman.Help Needed: I am unable to run
bundle exec rspecwithout Java errors (java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput ... jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x5f32ab17), likely due to JRuby being compiled with OpenJDK 19? (Installed via Homebrew). The problem looks like it's in../logstash/logstash-core.Can someone assist by recommending JRuby and Java versions that are known to be working?
Otherwise, I assume the spec test changes in #120 will provide great coverage for this PR.