2009-01-29
2009-01-29 22:07:33 by Martin Jonsson <marty@roxen.com>
-
375485075b027835c16a895c23d138e28068e2de
(15 lines)
(+9/-6)
[
Show
| Annotate
]
Branch: 5.2
Alter the ETag when serving gzipped content also when it's been stored in the protocol cache.
Rev: server/protocols/http.pike:1.587
2:
// Modified by Francesco Chemolli to add throttling capabilities.
// Copyright © 1996 - 2004, Roxen IS.
- constant cvs_version = "$Id: http.pike,v 1.586 2009/01/29 22:00:57 marty Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.587 2009/01/29 22:07:33 marty Exp $";
// #define REQUEST_DEBUG
#define MAGIC_ERROR
2351: Inside #if defined(HTTP_COMPRESSION)
file->len = sizeof(file->data);
variant_heads["Content-Length"] = (string)file->len;
file->encoding = "gzip";
- if(misc->etag) {
+ file->compressed = 1;
+ }
+ }
+
+ if(file->compressed && misc->etag) {
string etag = misc->etag;
if(etag[sizeof(etag)-1..] == "\"")
misc->etag = etag[..sizeof(etag)-2] + ";gzip\"";
}
- }
- }
+
#endif
// Some browsers, e.g. Netscape 4.7, don't trust a zero