Author: markt
Date: Fri Oct 24 14:30:49 2008
New Revision: 707752
URL: http://svn.apache.org/viewvc?rev=707752&view=rev
Log:
Fix 45735. Improve ETag handling.
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceAttributes.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=707752&r1=707751&r2=707752&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct 24 14:30:49 2008
@@ -73,11 +73,6 @@
-0: remm: configuring this is useless (esp on Windows, only the default
behavior gives acceptable performance)
-1:
-* ETag improvement: https://issues.apache.org/bugzilla/show_bug.cgi?id=45735
- +1: remm, markt, rjung
- -1:
- rjung: I assume you are going to add it to trunk as well. Backport also
applies to 5.5 and 4.1.
-
* Handle session suffix rewrite at JvmRouteBinderValve with parallel requests
from same client
http://svn.apache.org/viewvc?rev=693378&view=rev
+1: pero, fhanik
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceAttributes.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceAttributes.java?rev=707752&r1=707751&r2=707752&view=diff
==============================================================================
---
tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceAttributes.java
(original)
+++
tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceAttributes.java
Fri Oct 24 14:30:49 2008
@@ -718,29 +718,29 @@
* @return ETag
*/
public String getETag(boolean strong) {
- String result = null;
- if (attributes != null) {
- Attribute attribute = attributes.get(ETAG);
- if (attribute != null) {
- try {
- result = attribute.get().toString();
- } catch (NamingException e) {
- ; // No value for the attribute
- }
- }
- }
if (strong) {
// The strong ETag must always be calculated by the resources
- result = strongETag;
+ 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() + "\"";
}
- result = weakETag;
+ return weakETag;
}
- return result;
}
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=707752&r1=707751&r2=707752&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Oct 24 14:30:49 2008
@@ -83,6 +83,9 @@
dependencies should allows be considered to be full-filled. (markt)
</fix>
<fix>
+ <bug>45735</bug>: Improve ETag handling. (remm)
+ </fix>
+ <fix>
<bug>45785</bug>: Ignore directories named xxx.jar in WEB-INF/lib.
(markt)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]