HistoryManager now compares new requests with the previous one on the basis of Content-Type

This commit is contained in:
Rohit Awate 2018-06-30 22:01:51 +05:30
parent 738ecfee15
commit eca1a639e6
No known key found for this signature in database
GPG key ID: 1051D7B79CF2EE25

View file

@ -273,6 +273,18 @@ public class HistoryManager {
return false;
if (!(newState.httpMethod.equals("GET") || newState.httpMethod.equals("DELETE"))) {
statement = conn.prepareStatement(EverestUtilities.trimString(queries.get("selectRequestContentType").toString()));
statement.setInt(1, lastRequestID);
RS = statement.executeQuery();
String previousContentType = "";
if (RS.next())
previousContentType = RS.getString("ContentType");
if (!newState.contentType.equals(previousContentType))
return false;
switch (newState.contentType) {
case MediaType.TEXT_PLAIN:
case MediaType.APPLICATION_JSON: