[squid-users] Vary object loop returns

Yuri Voinov yvoinov at gmail.com
Sat Jun 4 21:20:27 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
Well, will test.


05.06.2016 2:39, joe пишет:
> --- src/client_side.cc    2016-05-25 02:27:13.000000000 +0300
> +++ src/client_side.cc    2016-06-04 23:14:16.000000000 +0300
> @@ -140,7 +140,7 @@
>  #if LINGERING_CLOSE
>  #define comm_close comm_lingering_close
>  #endif
> -
> +#include <regex>
>  /// dials clientListenerConnectionOpened call
>  class ListeningStartedDialer: public CallDialer, public
> Ipc::StartListeningCb
>  {
> @@ -4738,6 +4738,17 @@
>              if (!vary.isEmpty())
>                  request->vary_headers = vary;
>          }
> +        /* new test in vary header there is unwanted mark deed code
wish is
> marked with %20 tell the browser not to use */
> +        /* and its affecting the cache for cache hit %   if you use 2
> browser example Firefox and chrome and load object */
> +        /* that has vary --> accept-encoding="gzip,%20deflate,%20sdch */
> +        /* second browser use the same object link and has different
> accept-encoding="gzip,%20deflate" */
> +        /* as you notice they do not match so result miss and it
delete the
> previous object from the cache */
> +        /* the new code should filter out those marked with %20 the
> different is really big in % hit */
> +        if (!vary.isEmpty()) {
> +            std::regex e ("\\b(,%20)(.*)([,\"]$)");  
> +            vary=SBuf(std::regex_replace (vary.c_str(),e,"")+"\"");
> +             return VARY_MATCH;
> +        }
> 
>          if (vary.isEmpty()) {
>              /* Ouch.. we cannot handle this kind of variance */

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
 
iQEcBAEBCAAGBQJXU0YbAAoJENNXIZxhPexGkJYIALjp4bMdOKGyR8zx2Rc+OeRF
hlg9YTDIhCPRL3fGqg1MktgZBAyiQzgZ+Nig72efKXTTXW6PU9mNskGYVfjsb45T
DBkUC0GnrIBNGQHMzdIniO1U+lYkl8H/7a+KnUutGsICJfUjJCkI+7fV9YGjQInl
fFv/D04au/da4Zd/bPzJTKRIbRrMNYj6I4LzXwBSxW+0ppWsya/utZX328Q73hFD
CnHf7YP1P2fW7mxsaBkbdVtlOKuLKJjnJHOh1KKgl5NZ3GWEHsyoElTkKeu9uU9+
h1M0cAkv39ryawYFywXhNqeSm+tUBBKKkFGge+UlOB/vjFPPT2WX2859UIid14M=
=KROn
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x613DEC46.asc
Type: application/pgp-keys
Size: 2437 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160605/91d9f503/attachment.key>


More information about the squid-users mailing list