Skip to content

Commit

Permalink
DO NOT MERGE: attempt to fail on alreayd set headers
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Feb 7, 2024
1 parent 44b8b12 commit 2887852
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ public Entry(MessageBodyWriter<?> writer, MediaType mediaType) {

public static void encodeResponseHeaders(ResteasyReactiveRequestContext requestContext) {
ServerHttpResponse vertxResponse = requestContext.serverResponse();
boolean ouch = false;
for (java.util.Map.Entry<String, String> entry : vertxResponse.getAllResponseHeaders()) {
System.err.println("Found header: " + entry.getKey() + ": " + entry.getValue());
ouch = true;
}
if (ouch) {
throw new RuntimeException("Assertion failed: found vert.x headers before setting response");
}
LazyResponse lazyResponse = requestContext.getResponse();
if (!lazyResponse.isCreated() && lazyResponse.isPredetermined()) {
//fast path
Expand Down

0 comments on commit 2887852

Please sign in to comment.