Re: [squid-dev] [RFC] support Cache-Control:immutable

2016-10-26 Thread Alex Rousskov
On 10/26/2016 05:45 PM, Amos Jeffries wrote:
> This new cache control extension being proposed by Mozilla looks like it
> will be quite useful to us as well as browsers.
> 
> 
> 
> I would like to jump in this early and make Squid-4 be one of the first
> implementations once the middleware caching details are little bit more
> clear. I've already begun discussions to that end in the IETF WG.

I am puzzled why you request comments on this issue. Are there any
hidden negative side effects of supporting this extension? Some trade
offs that we should be discussing/considering?


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] Refactor wordlist to SBufList in acl/RegexData

2016-10-26 Thread Alex Rousskov
On 10/26/2016 05:18 PM, Kinkie wrote:
>>> the attached patch refactors the use of wordlist to SBufList in
>>> acl/RegexData.cc

> -while (wl != NULL) {
> +for (SBuf i : sl) {

If possible, please avoid creating new SBufs by declaring "i" to be a
constant reference to SBuf. It is probably possible unless you modify
"i" -- I cannot tell for sure by looking at all the "i"s in the patch.

Renaming "i" to something longer and more informative like
"patternOrOption" or even "slowPatternOrOption" would be useful for
those who try to understand what is going on and/or have to find that
variable in a text full of other "i"s.


> +for (auto i : sl) {

Same here, on all counts. Auto does not automatically adds "&" or "const".


What is the time difference in configuring, for example, one million of
regexes using patched and unpatched code?


I have not reviewed the patch closely. I have no objections.


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] [RFC] support Cache-Control:immutable

2016-10-26 Thread Amos Jeffries
This new cache control extension being proposed by Mozilla looks like it
will be quite useful to us as well as browsers.



I would like to jump in this early and make Squid-4 be one of the first
implementations once the middleware caching details are little bit more
clear. I've already begun discussions to that end in the IETF WG.

Amos
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] Refactor wordlist to SBufList in acl/RegexData

2016-10-26 Thread Kinkie
On Wed, Oct 26, 2016 at 10:40 PM, Amos Jeffries  wrote:
> On 27/10/2016 9:16 a.m., Kinkie wrote:
>> Hi all,
>>the attached patch refactors the use of wordlist to SBufList in
>> acl/RegexData.cc; the "test.txt" attachment shows the output of
>> "./src/squid -X 2>&1 | grep 'RegexData' >/tmp/test_plan.txt" when
>> applied to a default configuration file with these additions:
>> acl t1 dstdom_regex pattern1 pattern2
>> acl t2 dstdom_regex -i pattern3 pattern4
>> acl t3 dstdom_regex +i pattern5 pattern6
>>
>
> Audit:
>
> * can you please take advantage of the change to get rid of the
> "compileOptimisedREs: compileOptimisedREs:" in the logs

Cleaned logs up.

> * please use emplace_back instead of sl.push_back(SBuf(clean));
>  - line ~234

Ok. Fixed in all instances.

Updated patch attached. If noone objects before then, I'll merge in ~8hrs.


Francesco Chemolli


wordlist-sbuflist-aclregexdata.patch
Description: Binary data
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] ssl::server_name ACL badly broken since inception (trunk r14008).

2016-10-26 Thread Amos Jeffries
On 21/10/2016 5:18 a.m., Christos Tsantilas wrote:
> 
> The original server_name code mishandled all SNI checks and some rare
> host checks:
> 
> * The SNI-derived value was pointing to an already freed memory storage.
> * Missing host-derived values were not detected (host() is never nil).
> * Mismatches were re-checked with an undocumented "none" value instead
> of being treated as mismatches.
> 
> Same for ssl::server_name_regex.
> 
> Also set SNI for more server-first and client-first transactions.
> 
> This is a Measurement Factory project.
> 

+1.

Amos


___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] Refactor wordlist to SBufList in acl/RegexData

2016-10-26 Thread Amos Jeffries
On 27/10/2016 9:16 a.m., Kinkie wrote:
> Hi all,
>the attached patch refactors the use of wordlist to SBufList in
> acl/RegexData.cc; the "test.txt" attachment shows the output of
> "./src/squid -X 2>&1 | grep 'RegexData' >/tmp/test_plan.txt" when
> applied to a default configuration file with these additions:
> acl t1 dstdom_regex pattern1 pattern2
> acl t2 dstdom_regex -i pattern3 pattern4
> acl t3 dstdom_regex +i pattern5 pattern6
> 

Audit:

* can you please take advantage of the change to get rid of the
"compileOptimisedREs: compileOptimisedREs:" in the logs

* please use emplace_back instead of sl.push_back(SBuf(clean));
 - line ~234


+1.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] [PATCH] Refactor wordlist to SBufList in acl/RegexData

2016-10-26 Thread Kinkie
Hi all,
   the attached patch refactors the use of wordlist to SBufList in
acl/RegexData.cc; the "test.txt" attachment shows the output of
"./src/squid -X 2>&1 | grep 'RegexData' >/tmp/test_plan.txt" when
applied to a default configuration file with these additions:
acl t1 dstdom_regex pattern1 pattern2
acl t2 dstdom_regex -i pattern3 pattern4
acl t3 dstdom_regex +i pattern5 pattern6



-- 
Francesco Chemolli
2016/10/26 21:07:27.313| 28,2| RegexData.cc(228) parse: new Regex line or file
2016/10/26 21:07:27.313| 28,3| RegexData.cc(237) parse: buffering RE '-i'
2016/10/26 21:07:27.313| 28,3| RegexData.cc(237) parse: buffering RE 
'^cache_object://'
2016/10/26 21:07:27.313| 28,3| RegexData.cc(237) parse: buffering RE '+i'
2016/10/26 21:07:27.314| 28,3| RegexData.cc(237) parse: buffering RE 
'^https?://[^/]+/squid-internal-mgr/'
2016/10/26 21:07:27.314| 28,2| RegexData.cc(151) compileOptimisedREs: 
compileOptimisedREs: -i
2016/10/26 21:07:27.314| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE '^cache_object://'
2016/10/26 21:07:27.314| 28,2| RegexData.cc(162) compileOptimisedREs: 
compileOptimisedREs: +i
2016/10/26 21:07:27.314| 28,2| RegexData.cc(118) compileRE: compiled 
'(^cache_object://)' with flags 7
2016/10/26 21:07:27.315| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE '^https?://[^/]+/squid-internal-mgr/'
2016/10/26 21:07:27.315| 28,2| RegexData.cc(118) compileRE: compiled 
'(^https?://[^/]+/squid-internal-mgr/)' with flags 5
2016/10/26 21:07:27.315| 28,2| RegexData.cc(197) compileOptimisedREs: 
compileOptimisedREs: 2 REs are optimised into one RE.
2016/10/26 21:07:27.337| 28,2| RegexData.cc(228) parse: new Regex line or file
2016/10/26 21:07:27.337| 28,3| RegexData.cc(237) parse: buffering RE 'pattern1'
2016/10/26 21:07:27.337| 28,3| RegexData.cc(237) parse: buffering RE 'pattern2'
2016/10/26 21:07:27.337| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern1'
2016/10/26 21:07:27.338| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern2'
2016/10/26 21:07:27.338| 28,2| RegexData.cc(118) compileRE: compiled 
'(pattern1)|(pattern2)' with flags 5
2016/10/26 21:07:27.338| 28,2| RegexData.cc(197) compileOptimisedREs: 
compileOptimisedREs: 2 REs are optimised into one RE.
2016/10/26 21:07:27.338| 28,2| RegexData.cc(228) parse: new Regex line or file
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE '-i'
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE 'pattern3'
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE 'pattern4'
2016/10/26 21:07:27.338| 28,2| RegexData.cc(151) compileOptimisedREs: 
compileOptimisedREs: -i
2016/10/26 21:07:27.338| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern3'
2016/10/26 21:07:27.338| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern4'
2016/10/26 21:07:27.338| 28,2| RegexData.cc(118) compileRE: compiled 
'(pattern3)|(pattern4)' with flags 7
2016/10/26 21:07:27.338| 28,2| RegexData.cc(197) compileOptimisedREs: 
compileOptimisedREs: 2 REs are optimised into one RE.
2016/10/26 21:07:27.338| 28,2| RegexData.cc(228) parse: new Regex line or file
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE '+i'
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE 'pattern5'
2016/10/26 21:07:27.338| 28,3| RegexData.cc(237) parse: buffering RE 'pattern6'
2016/10/26 21:07:27.339| 28,2| RegexData.cc(160) compileOptimisedREs: 
compileOptimisedREs: optimisation of +i ... +i
2016/10/26 21:07:27.339| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern5'
2016/10/26 21:07:27.339| 28,2| RegexData.cc(169) compileOptimisedREs: 
compileOptimisedREs: adding RE 'pattern6'
2016/10/26 21:07:27.339| 28,2| RegexData.cc(118) compileRE: compiled 
'(pattern5)|(pattern6)' with flags 5
2016/10/26 21:07:27.339| 28,2| RegexData.cc(197) compileOptimisedREs: 
compileOptimisedREs: 2 REs are optimised into one RE.


wordlist-sbuflist-aclregexdata.patch
Description: Binary data
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] Build failed in Jenkins: trunk-full-matrix » clang,d-ubuntu-wily #264

2016-10-26 Thread noc
http://build.squid-cache.org/job/trunk-full-matrix/compiler=clang,label=d-ubuntu-wily/264/--
[...truncated 6788 lines...]
make[5]: Leaving directory 
'
Making dvi in NIS
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
Making dvi in POP3
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
Making dvi in RADIUS
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
Making dvi in SMB
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
Making dvi in fake
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
Making dvi in getpwnam
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi-am'.
make[5]: Leaving directory 
'
make[4]: Leaving directory 
'
Making dvi in digest
make[4]: Entering directory 
'
Making dvi in file
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi'.
make[5]: Leaving directory 
'
make[5]: Entering directory 
'
make[5]: Nothing to be done for 'dvi-am'.
make[5]: Leaving directory 
'
make[4]: Leaving directory 
'
Making dvi in negotiate
make[4]: Entering directory 

[squid-dev] Build failed in Jenkins: trunk-matrix » gcc,d-debian-wheezy #813

2016-10-26 Thread noc
http://build.squid-cache.org/job/trunk-matrix/compiler=gcc,label=d-debian-wheezy/813/--
[...truncated 4601 lines...]
libtool: link: (cd .libs/libfs.lax/libaufs.a && /usr/bin/ar x 
"
libtool: link: (cd .libs/libfs.lax/libdiskd.a && /usr/bin/ar x 
"
libtool: link: (cd .libs/libfs.lax/librock.a && /usr/bin/ar x 
"
libtool: link: (cd .libs/libfs.lax/libufs.a && /usr/bin/ar x 
"
libtool: link: /usr/bin/ar cru .libs/libfs.a .libs/Module.o   
.libs/libfs.lax/libaufs.a/StoreFSaufs.o  
.libs/libfs.lax/libdiskd.a/StoreFSdiskd.o  
.libs/libfs.lax/librock.a/RockDbCell.o 
.libs/libfs.lax/librock.a/RockHeaderUpdater.o 
.libs/libfs.lax/librock.a/RockIoRequests.o 
.libs/libfs.lax/librock.a/RockIoState.o .libs/libfs.lax/librock.a/RockRebuild.o 
.libs/libfs.lax/librock.a/RockStoreFileSystem.o 
.libs/libfs.lax/librock.a/RockSwapDir.o  
.libs/libfs.lax/libufs.a/RebuildState.o .libs/libfs.lax/libufs.a/StoreFSufs.o 
.libs/libfs.lax/libufs.a/StoreSearchUFS.o 
.libs/libfs.lax/libufs.a/UFSStoreState.o .libs/libfs.lax/libufs.a/UFSStrategy.o 
.libs/libfs.lax/libufs.a/UFSSwapDir.o 
.libs/libfs.lax/libufs.a/UFSSwapLogParser.o 
libtool: link: ranlib .libs/libfs.a
libtool: link: rm -fr .libs/libfs.lax
libtool: link: ( cd ".libs" && rm -f "libfs.la" && ln -s "../libfs.la" 
"libfs.la" )
make[4]: Leaving directory 
`
Making all in repl
make[4]: Entering directory 
`
depbase=`echo lru/store_repl_lru.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
ccache g++ -DHAVE_CONFIG_H   -I../../.. -I../../../include 
-I../../../lib -I../../../src -I../../include-I../../../src/repl  -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual 
-Werror -Wno-deprecated-register -pipe -D_REENTRANT -g -O2 -std=c++11 -MT 
lru/store_repl_lru.o -MD -MP -MF $depbase.Tpo -c -o lru/store_repl_lru.o 
../../../src/repl/lru/store_repl_lru.cc &&\
mv -f $depbase.Tpo $depbase.Po
rm -f liblru.a
/usr/bin/ar cru liblru.a lru/store_repl_lru.o 
ranlib liblru.a
make[4]: Leaving directory 
`
Making all in store
make[4]: Entering directory 
`
Making all in id_rewriters
make[5]: Entering directory 
`
Making all in file
make[6]: Entering directory 
`
sed -e 's,[@]PERL[@],/usr/bin/perl,g' 
<../../../../../src/store/id_rewriters/file/storeid_file_rewrite.pl.in 
>storeid_file_rewrite || (/bin/rm -f -f storeid_file_rewrite ; exit 1)
pod2man --section=8 storeid_file_rewrite storeid_file_rewrite.8
make[6]: Leaving directory 
`
make[6]: Entering directory 
`
make[6]: Nothing to be done for `all-am'.
make[6]: Leaving directory 
`
make[5]: Leaving directory 
`
make[5]: Entering directory 
`
depbase=`echo Controller.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../../libtool --tag=CXX   --mode=compile ccache g++