From 77c016dc10d0df460563b9a35aa0bcd13a65f958 Mon Sep 17 00:00:00 2001 From: Manishi Mittal Date: Wed, 16 Dec 2020 18:09:24 +0530 Subject: [PATCH] Updated patches for fix_deadlock, Add httpclient, Use IANA content type --- .../java/org/jitsi/impl/reservation/rest/ApiHandler.java | 8 ++++++-- .../java/org/jitsi/jicofo/auth/AbstractAuthAuthority.java | 5 +---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/jitsi/impl/reservation/rest/ApiHandler.java b/src/main/java/org/jitsi/impl/reservation/rest/ApiHandler.java index 2c58286a69..f5087f564a 100644 --- a/src/main/java/org/jitsi/impl/reservation/rest/ApiHandler.java +++ b/src/main/java/org/jitsi/impl/reservation/rest/ApiHandler.java @@ -22,6 +22,7 @@ import org.apache.http.client.entity.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; +import org.apache.http.impl.*; import org.apache.http.message.*; import org.apache.http.util.*; import org.jitsi.impl.reservation.rest.json.*; @@ -56,7 +57,10 @@ public class ApiHandler * HTTP client used for sending requests. */ private final CloseableHttpClient client - = HttpClientBuilder.create().build(); + = HttpClientBuilder + .create() + .setConnectionReuseStrategy(NoConnectionReuseStrategy.INSTANCE) + .build(); /** * JSONParser instance used for parsing JSON. @@ -119,7 +123,7 @@ public ApiResult createNewConference(String ownerEmail, entry.getKey(), String.valueOf(entry.getValue()))); } - post.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF8")); + post.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8")); logger.info("Sending post: " + jsonMap); diff --git a/src/main/java/org/jitsi/jicofo/auth/AbstractAuthAuthority.java b/src/main/java/org/jitsi/jicofo/auth/AbstractAuthAuthority.java index 39964461f7..44957e9d1c 100644 --- a/src/main/java/org/jitsi/jicofo/auth/AbstractAuthAuthority.java +++ b/src/main/java/org/jitsi/jicofo/auth/AbstractAuthAuthority.java @@ -413,10 +413,7 @@ protected void notifyUserAuthenticated(Jid userJid, public IQ processAuthentication( ConferenceIq query, ConferenceIq response) { - synchronized (syncRoot) - { - return processAuthLocked(query, response); - } + return processAuthLocked(query, response); } /**