diff options
author | Greg Wilkins | 2015-09-18 04:54:07 +0000 |
---|---|---|
committer | Greg Wilkins | 2015-09-18 04:54:07 +0000 |
commit | 269ac1a44e348ecfcf36eb0b491a528a46c3f206 (patch) | |
tree | 2e4cf4f82fcbc71c9f5932250fad25a552a269d4 | |
parent | 67aee72bdd20df91e0775d2177f0d72d282a9ebe (diff) | |
download | org.eclipse.jetty.project-269ac1a44e348ecfcf36eb0b491a528a46c3f206.tar.gz org.eclipse.jetty.project-269ac1a44e348ecfcf36eb0b491a528a46c3f206.tar.xz org.eclipse.jetty.project-269ac1a44e348ecfcf36eb0b491a528a46c3f206.zip |
477737 Improve handling of etags with dynamic and static gzip
Fixed spin on --gzip etag
-rw-r--r-- | jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java index 688ed4cebc..8a14d13ab5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java @@ -420,10 +420,14 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory if (etag!=null) { int i=etag.indexOf(ETAG_GZIP_QUOTE); - while (i>=0) + if (i>0) { - baseRequest.getHttpFields().put(new HttpField(HttpHeader.ETAG,etag.substring(0,i)+etag.substring(i+GzipHttpContent.ETAG_GZIP.length()))); - i=etag.indexOf(ETAG_GZIP_QUOTE,i); + while (i>=0) + { + etag=etag.substring(0,i)+etag.substring(i+GzipHttpContent.ETAG_GZIP.length()); + i=etag.indexOf(ETAG_GZIP_QUOTE,i); + } + baseRequest.getHttpFields().put(new HttpField(HttpHeader.IF_NONE_MATCH,etag)); } } |