Selaa lähdekoodia

Merge branch 'feature/etag' into 'wrdp'

代码修改etag判断

See merge request o2oa/o2oa!2113
o2null 5 vuotta sitten
vanhempi
commit
c990735d68

+ 2 - 7
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java

@@ -142,13 +142,8 @@ public class ResponseFactory {
 	}
 
 	private static boolean notModified(HttpServletRequest request, EntityTag tag) {
-		String If_None_Match = request.getHeader(HttpHeader.IF_NONE_MATCH.toString());
-		if (StringUtils.isNotEmpty(If_None_Match)) {
-			if (StringUtils.equals(If_None_Match, "\"" + tag.getValue() + "\"")) {
-				return true;
-			}
-		}
-		return false;
+		String ifNoneMatch = request.getHeader(HttpHeader.IF_NONE_MATCH.toString());
+		return (StringUtils.isNotEmpty(ifNoneMatch) && StringUtils.equals(ifNoneMatch, "\"" + tag.getValue() + "\""));
 	}
 
 	private static String etagWoFile(WoFile wo) {

+ 1 - 0
o2server/x_console/src/main/java/com/x/server/console/action/ThreadDump.java

@@ -41,6 +41,7 @@ public class ThreadDump {
 						logger.print("thread dump to file:{}.", out.toString());
 						Thread.sleep(1000);
 					}
+					logger.print("{} thread dump completed.", count);
 				} catch (Exception e) {
 					e.printStackTrace();
 				}