-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Http server: Allow to disable not-found on missing body #11059
Conversation
core-reactive/src/main/java/io/micronaut/core/async/publisher/Publishers.java
Outdated
Show resolved
Hide resolved
http-server/src/main/java/io/micronaut/http/server/HttpServerConfiguration.java
Outdated
Show resolved
Hide resolved
...k-netty/src/test/java/io/micronaut/http/server/tck/netty/tests/NettyHttpServerTestSuite.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add a mention in https://github.com/micronaut-projects/micronaut-core/blob/4.6.x/src/main/docs/guide/httpServer/serverIO.adoc#404-responses to tell users how to disable this behaviour and what would be the behaviour if they set an
not-found-on-missing-bodyto
false`
http-server/src/main/java/io/micronaut/http/server/RouteExecutor.java
Outdated
Show resolved
Hide resolved
@@ -678,8 +687,7 @@ private CorePublisher<MutableHttpResponse<?>> fromReactiveExecute(PropagatedCont | |||
} | |||
return response.contextWrite(context -> ReactorPropagation.addPropagatedContext(context, propagatedContext).put(ServerRequestContext.KEY, request)); | |||
} | |||
MutableHttpResponse<?> response = forStatus(routeInfo, null).body(body); | |||
return processPublisherBody(propagatedContext, request, response, routeInfo); | |||
return processPublisherBody(propagatedContext, request, forStatus(routeInfo, null), false, publisher, routeInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the .body
gone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a bit of refactoring to pass the converted publisher right away
…or.java Co-authored-by: Jonas Konrad <jonas.konrad@oracle.com>
Added docs @sdelamo |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Quality Gate passedIssues Measures |
No description provided.