https://issues.apache.org/bugzilla/show_bug.cgi?id=45735
Summary: Updated ResourceAttributes.getETag Product: Tomcat 6 Version: 6.0.18 Platform: PC OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] After looking at a user's list post, I noticed the implementation was not consistent with the other getters (like getName). I propose changing it to: public String getETag(boolean strong) { if (strong) { // The strong ETag must always be calculated by the resources if (strongETag != null) return strongETag; if (attributes != null) { Attribute attribute = attributes.get(ETAG); if (attribute != null) { try { strongETag = attribute.get().toString(); } catch (NamingException e) { ; // No value for the attribute } } } return strongETag; } else { // The weakETag is contentLenght + lastModified if (weakETag == null) { weakETag = "W/\"" + getContentLength() + "-" + getLastModified() + "\""; } return weakETag; } } -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]