Skip to content

Commit

Permalink
[fixes quarkusio#5959] - Temporary fix to content type resolution tha…
Browse files Browse the repository at this point in the history
…t fixes processing of json body
  • Loading branch information
pedroigor committed Dec 6, 2019
1 parent 5cef24b commit a00a479
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import io.quarkus.vertx.http.runtime.VertxInputStream;
import io.quarkus.vertx.http.runtime.security.QuarkusHttpUser;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.http.impl.CookieImpl;
Expand Down Expand Up @@ -107,7 +108,16 @@ public Cookie getCookie(String cookieName) {

@Override
public String getHeader(String name) {
return request.getHeader(name);
//TODO: this logic should be removed once KEYCLOAK-12412 is fixed
String value = request.getHeader(name);

if (name.equalsIgnoreCase(HttpHeaders.CONTENT_TYPE.toString())) {
if (value.indexOf(';') != -1) {
return value.substring(0, value.indexOf(';'));
}
}

return value;
}

@Override
Expand Down

0 comments on commit a00a479

Please sign in to comment.