449811 handle unquoted etags when gzipping

This commit is contained in:
Greg Wilkins 2014-11-05 11:07:14 +11:00
parent d410fa57b5
commit c9c6ec8d63

View File

@ -256,8 +256,9 @@ public abstract class AbstractCompressedStream extends ServletOutputStream
String etag=_wrapper.getETag();
if (etag!=null)
{
if (etag.charAt(0)=='"')
setHeader("ETag",etag.substring(0,etag.length()-1)+"--"+_encoding+'"');
int end = etag.length()-1;
if (etag.charAt(end)=='"')
setHeader("ETag",etag.substring(0,end)+"--"+_encoding+'"');
else
setHeader("ETag",etag+"--"+_encoding);
}