Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-10-02 Thread Alex Rousskov
On 10/02/2016 03:25 PM, Kinkie wrote: > On Fri, Sep 30, 2016 at 6:03 PM, Alex Rousskov > <rouss...@measurement-factory.com> wrote: >> On 09/29/2016 09:19 PM, Amos Jeffries wrote: >>> On 30/09/2016 5:03 a.m., Alex Rousskov wrote: >>>> Should we remove the inc

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-10-01 Thread Alex Rousskov
On 09/30/2016 10:55 PM, Amos Jeffries wrote: > On 1/10/2016 6:10 a.m., Alex Rousskov wrote: >> On 09/30/2016 10:58 AM, Amos Jeffries wrote: >>> On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >>>> On 09/30/2016 09:38 AM, Amos Jeffries wrote: >>>>> So I th

Re: [squid-dev] [PATCH] cleanup removal of needless get()

2016-10-01 Thread Alex Rousskov
On 09/30/2016 11:05 PM, Amos Jeffries wrote: > The SSL code in particular contains a lot of calls to the get() on > various Pointer objects from the general code. > > Now that C++11 gives our Pointer better boolean operators, and > dereference oerators have been added. A bunch of these calls are

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:37 AM, Amos Jeffries wrote: > Please make sure that your code debugs() dumps the full pfctl line(s) > received at level DBG_DATA, and (only) on errors the relevant bit at a > higher level like 2 or 3 - the other functions debug output can give This approach is outdated because

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:58 AM, Amos Jeffries wrote: > On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >> On 09/30/2016 09:38 AM, Amos Jeffries wrote: >>> So I think we can start using these to replace old C-style >>> initialization and clear() functions. >> Agreed. I wonde

Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-09-30 Thread Alex Rousskov
On 09/29/2016 09:19 PM, Amos Jeffries wrote: > On 30/09/2016 5:03 a.m., Alex Rousskov wrote: >> Should we remove the increment to make concurrent c_str() calls safe? > The reason it exists remember is to prevent other SBuf sharing that > storage MemBuf from thinking they can append

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:38 AM, Amos Jeffries wrote: > We now seem to have had several patches successfully use members > declared with default values and/or with the "*this = Foo();" shortcut > for a reset/clear method. The *this assignment works for pre-C++11 v3.5 as well. The default values will not

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:04 AM, Shively, Gregory wrote: > How about I get rid of the loop all together All other factors being equal, a single statement is better than a loop with a similar statement inside. > - I should be > only getting one line from pfctl, and if the parsing fails -I should >

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-29 Thread Alex Rousskov
On 09/29/2016 03:48 PM, Shively, Gregory wrote: >>> I wasn't sure if I should handle it or let it flow up, since if it was >>> in an overflow state I would doubt I could handle this packet, but >>> maybe the next connection would be successful. >> I recommend temporary adding an exception with

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-29 Thread Alex Rousskov
On 09/29/2016 01:12 PM, Shively, Gregory wrote: > Sometimes these mailing lists make me think like I'm talking to one > person :-). Glad we all sound coherent to you :-)! > ERROR: files left in build directory after distclean: > ./src/cf_gen.dSYM/Contents/Info.plist >

[squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-09-29 Thread Alex Rousskov
Hello, The current trunk code contains at least two serious bugs caused by SBuf::c_str() misuse. Both known bugs looks similar: > storeCreateEntry(storeUri.c_str(), storeUri.c_str(), ...); and > storeCreateEntry(uri.c_str(), uri.c_str(), ...); Both use cases violate safe c_str() use

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-26 Thread Alex Rousskov
On 09/26/2016 12:59 PM, Shively, Gregory wrote: > The patch calls /sbin/pfctl to get the > redirect state information For every intercepted connection, this patch forks Squid to start a shell (which then starts pfctl and awk) and then blocks Squid on that shell output, right? That feels very

Re: [squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-20 Thread Alex Rousskov
On 09/20/2016 11:58 AM, Alex Rousskov wrote: > On 09/20/2016 04:10 AM, Amos Jeffries wrote: >> On 20/09/2016 9:52 a.m., Alex Rousskov wrote: >>> The attached trunk patch fixes bug 3819 in our tests. > >> +1. Thank you. > > Committed with one additiona

Re: [squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-20 Thread Alex Rousskov
On 09/20/2016 04:10 AM, Amos Jeffries wrote: > On 20/09/2016 9:52 a.m., Alex Rousskov wrote: >> The attached trunk patch fixes bug 3819 in our tests. > +1. Thank you. Committed with one additional fix to trunk (r14815 and r14816). The bug report has a v3.5 patch providing the sa

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-20 Thread Alex Rousskov
On 09/20/2016 04:41 AM, Amos Jeffries wrote: > On 16/09/2016 3:35 a.m., Alex Rousskov wrote: >> On 09/15/2016 03:50 AM, Amos Jeffries wrote: >>> The serverDestinations not changing (yet). >> I am pretty sure we have to change that field to implement >> dns_wait_f

[squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-19 Thread Alex Rousskov
Hello, The attached trunk patch fixes bug 3819 in our tests. Please note that the underlying problem may lead to other assertions, including "NumberOfUFSDirs" in UFSSwapDir and "fd >= 0" in file_close(). Since trunk r9181.3.1, reconfiguration is done in at least two steps: First,

Re: [squid-dev] FYI: trunk ContextPtr changes

2016-09-19 Thread Alex Rousskov
On 09/18/2016 08:04 PM, Amos Jeffries wrote: > I have split the work into batches to prevent it being one huge hairy > change diff that nobody can read. AFAICT, the correct way to achieve your goals is to merge a branch containing those "batches" as commits. That way, you get a single top-level

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-15 Thread Alex Rousskov
On 09/15/2016 03:50 AM, Amos Jeffries wrote: > On 15/09/2016 5:11 p.m., Alex Rousskov wrote: >> On 09/14/2016 07:26 PM, Amos Jeffries wrote: >>> On 15/09/2016 8:15 a.m., Alex Rousskov wrote: >>>> Any better ideas or objections to adding dns_wait_for_all? >>

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-14 Thread Alex Rousskov
On 09/14/2016 07:26 PM, Amos Jeffries wrote: > On 15/09/2016 8:15 a.m., Alex Rousskov wrote: >> Any better ideas or objections to adding dns_wait_for_all? > In principle okay. However, I was intending to redesign the object we > store DNS RR results in to achieve this is a

[squid-dev] [RFC] dns_wait_for_all

2016-09-14 Thread Alex Rousskov
Hello, Currently, when connecting to an origin server, Squid sends concurrent DNS A and queries and waits for both answers before proceeding with the HTTP transaction. If the authoritative DNS server (or something on its path) breaks or significantly delays IPv6 () transactions, then

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-13 Thread Alex Rousskov
On 09/13/2016 10:02 AM, Amos Jeffries wrote: > On 14/09/2016 2:52 a.m., Alex Rousskov wrote: >>> http::>h >>> To-be-adapted HTTP message headers sent by Squid to >>> the ICAP service (HTTP request headers in REQMOD; HTTP >>> response headers in RESPMOD).

Re: [squid-dev] Squid-4 release checklist

2016-09-13 Thread Alex Rousskov
On 09/13/2016 12:02 AM, Amos Jeffries wrote: > On 13/09/2016 6:22 a.m., Alex Rousskov wrote: >> On 09/12/2016 09:54 AM, Amos Jeffries wrote: >> >>> * <http://bugs.squid-cache.org/show_bug.cgi?id=4514> >>> Windows Update works via interception ptoxy on 3

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-13 Thread Alex Rousskov
On 09/12/2016 10:06 PM, Amos Jeffries wrote: > Just the new cf.data.pre docs for icap_log contradicting itself: > > " > http::>h... > HTTP response headers in RESPMOD) ... > currently does not support logging of HTTP response headers in > RESPMOD ... > " > > I think that should

Re: [squid-dev] Squid-4 release checklist

2016-09-12 Thread Alex Rousskov
On 09/12/2016 09:54 AM, Amos Jeffries wrote: > * > Windows Update works via interception ptoxy on 3.5.17, and no works > via transparent proxy on Squid 4.x. > > - FWIW; others have been mentioning various issues with various Squid > versions

Re: [squid-dev] Sad performance trend

2016-09-12 Thread Alex Rousskov
On 09/12/2016 09:38 AM, Amos Jeffries wrote: > On 7/09/2016 5:43 a.m., Alex Rousskov wrote: >> On 09/06/2016 08:27 AM, Amos Jeffries wrote: >>> On 27/08/2016 12:32 p.m., Alex Rousskov wrote: >>>> W1 W2 W3 W4 W5 W6 >>>> v3.1 32% 38% 16% 48%

Re: [squid-dev] Sad performance trend

2016-09-12 Thread Alex Rousskov
On 09/12/2016 07:25 AM, Kinkie wrote: > > On 27/08/2016 12:32 p.m., Alex Rousskov wrote: > >> W1 W2 W3 W4 W5 W6 > >> v3.1 32% 38% 16% 48% 16+ 9% > >> v3.3 23% 31% 14% 42% 15% 8% > >> v3.5 11% 16% 12% 36% 7%

Re: [squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

2016-09-10 Thread Alex Rousskov
On 09/10/2016 06:54 AM, Amos Jeffries wrote: > On 10/09/2016 7:26 a.m., Alex Rousskov wrote: >> On 09/09/2016 11:21 AM, Christos Tsantilas wrote: >>> On 09/09/2016 07:00 PM, Alex Rousskov wrote: >>>> On 09/09/2016 07:34 AM, Christos Tsantilas wrote: >>>&

Re: [squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

2016-09-09 Thread Alex Rousskov
On 09/09/2016 07:34 AM, Christos Tsantilas wrote: > On 09/09/2016 02:21 PM, Amos Jeffries wrote: >> These issues are caused by the new RegisterRunner() design using >> GetRidOfRunner(rr) if shutdown has already begun. That can potentially >> result in the constructor of a class inheriting from

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-06 Thread Alex Rousskov
On 09/05/2016 09:31 PM, Amos Jeffries wrote: > On 6/09/2016 8:52 a.m., Amos Jeffries wrote: >> On 3/09/2016 5:48 p.m., Alex Rousskov wrote: >>> On 09/02/2016 09:11 PM, Amos Jeffries wrote: >>> >>>> I would realy like it to be under Http:: and in http/ the re

Re: [squid-dev] Sad performance trend

2016-09-06 Thread Alex Rousskov
On 09/06/2016 08:27 AM, Amos Jeffries wrote: > On 27/08/2016 12:32 p.m., Alex Rousskov wrote: >> W1 W2 W3 W4 W5 W6 >> v3.1 32% 38% 16% 48% 16+ 9% >> v3.3 23% 31% 14% 42% 15% 8% >> v3.5 11% 16% 12% 36% 7% 6% >> v4.0 11% 15% 9% 30% 14%

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-02 Thread Alex Rousskov
On 09/02/2016 09:11 PM, Amos Jeffries wrote: > I would realy like it to be under Http:: and in http/ the rest is okay > to skip. Sounds good. I have no problems with moving that code into http/ and Http::. It is certainly appropriate, especially if you expect HTTP/2 code to benefit from this

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-02 Thread Alex Rousskov
On 09/02/2016 09:05 AM, Amos Jeffries wrote: > On 2/09/2016 11:21 a.m., Alex Rousskov wrote: >> This change handles multiple Content-Length values inside >> one header field, negative values, and trailing garbage. Handling the >> former required a change in the o

[squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-01 Thread Alex Rousskov
Hello, Squid is violating HTTP MUSTs by forwarding messages with problematic Content-Length values. Some of those bugs were fixed in trunk r14215. This change handles multiple Content-Length values inside one header field, negative values, and trailing garbage. Handling the former required a

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-30 Thread Alex Rousskov
On 08/30/2016 04:35 AM, Eduard Bagdasaryan wrote: > 2016-08-28 1:12 GMT+03:00 Alex Rousskov <rouss...@measurement-factory.com>: >> Not all HTCP clients are Squids, but how does Squid code treat such an >> HTCP TST response? > It seems that Squid does not care whether HT

Re: [squid-dev] [PATCH] Older response must not update

2016-08-27 Thread Alex Rousskov
On 08/27/2016 08:23 AM, Amos Jeffries wrote: > On 26/08/2016 5:05 a.m., Alex Rousskov wrote: >> I recommend renaming and re-documenting that subclass: >> >> /// Things that may happen to a transaction while it is being >> /// processed according to its LOG_* cat

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-27 Thread Alex Rousskov
On 08/27/2016 08:33 AM, Amos Jeffries wrote: > If the response Squid would emit to the client proxy would contain a > synthesized Last-Modified header - then the same synthetic value should > be sent in HTCP. I agree with that decision logic. > I think Squid should be emitting a synthetic L-M

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-27 Thread Alex Rousskov
On 08/27/2016 05:22 AM, Eduard Bagdasaryan wrote: > 2016-08-25 18:52 GMT+03:00 Alex Rousskov > <rouss...@measurement-factory.com>: > >> 3. Sending an HTCP message to another service. >> >> > -hdr.putTime(Http::HdrType::LAST_MODIFIED, e->lastmod);

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-25 Thread Alex Rousskov
On 08/25/2016 10:26 AM, Amos Jeffries wrote: > About > the only further optimization we can do there is make the > "CharacterSet::SP" that it outputs in the sensitive path be a local > static *within* DelimiterCharacters() itself and return a reference to > that instead of constructing a new

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-25 Thread Alex Rousskov
On 08/25/2016 10:26 AM, Amos Jeffries wrote: > 2016-08-23 17:50 GMT+03:00 Alex Rousskov: >> I wonder whether we should make this variable static to avoid repeated >> function calls on a performance-sensitive code path. > The output of DelimiterCharacters() cannot be stored i

Re: [squid-dev] [PATCH] Older response must not update

2016-08-25 Thread Alex Rousskov
On 08/25/2016 08:18 AM, Eduard Bagdasaryan wrote: > 2016-08-24 18:20 GMT+03:00 Amos Jeffries : > >> in src/LogTags.cc: >> * instead of adding new enum entry please extend LogTags with a new bool >> flag and the c_str() to append the "IGNORED" when that flag is true. > Added

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-25 Thread Alex Rousskov
On 08/25/2016 04:04 AM, Eduard Bagdasaryan wrote: > Therefore, we could use the timestamp if Last-Modified is unavailable. I do not understand why the patch hides the lastmod field behind a basic getter. If we assert that a timestamp-based last modification value should be used in many cases,

Re: [squid-dev] [PATCH] Older response must not update

2016-08-24 Thread Alex Rousskov
On 08/24/2016 09:20 AM, Amos Jeffries wrote: > in src/HttpReply.h: > * please use doxygen syntax "\returns" instead of "returns" in the > comment text. No objection, but please note that the "returns..." phrase in isolation does not fully describe what the method returns in this case. Only the

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-24 Thread Alex Rousskov
On 08/24/2016 08:30 AM, Amos Jeffries wrote: > On 25/08/2016 12:36 a.m., Eduard Bagdasaryan wrote: >> 2016-08-23 18:01 GMT+03:00 Alex Rousskov: >> >>> invalid request-line: missing delimiter before "HTTP/1" >> >> In order to generate "where&quo

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-24 Thread Alex Rousskov
On 08/24/2016 06:36 AM, Eduard Bagdasaryan wrote: > 2016-08-23 18:01 GMT+03:00 Alex Rousskov > <rouss...@measurement-factory.com>: > >> invalid request-line: missing delimiter before "HTTP/1" > > In order to generate "where" with such detalization

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-23 Thread Alex Rousskov
On 08/23/2016 09:17 AM, Amos Jeffries wrote: > On 24/08/2016 12:07 a.m., Eduard Bagdasaryan wrote: >> 2016-08-21 15:58 GMT+03:00 Amos Jeffries : >>> To change anything between those markers we have to do a full cache >>> versioning and up/down-grade compatibility dance. >>

Re: [squid-dev] Coding standards

2016-08-23 Thread Alex Rousskov
On 08/23/2016 05:48 AM, Adam Majer wrote: > What are the coding standards for Squid? Just to add to Kinkie's correct response: We do not have a comprehensive standard, unfortunately, but you can find a few requirements at http://wiki.squid-cache.org/SquidCodingGuidelines (which should be

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-23 Thread Alex Rousskov
On 08/23/2016 08:08 AM, Amos Jeffries wrote: > A followup patch can be done to give skipDelimiter a 'const char* which' > parameter that takes a description/name for the delimiter to improve > that debug output. > > so: > skipDelimiter(blah, "method") > > produces: > invalid request-line:

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-23 Thread Alex Rousskov
On 08/23/2016 03:26 AM, Eduard Bagdasaryan wrote: > 2016-08-23 3:08 GMT+03:00 Alex Rousskov: >> I do not understand why you decided to use maxMethodLength in >> parseRequestFirstLine(). AFAICT, parseMethodField() already does >> everything we need: It logs an error message and

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-22 Thread Alex Rousskov
On 08/22/2016 04:24 PM, Eduard Bagdasaryan wrote: > -// Limit to 32 characters to prevent overly long sequences of non-HTTP > -// being sucked in before mismatch is detected. 32 is itself annoyingly > -// big but there are methods registered by IANA that reach 17 bytes: > -//

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-11 Thread Alex Rousskov
On 08/11/2016 06:53 AM, Amos Jeffries wrote: > On 11/08/2016 11:50 p.m., Eduard Bagdasaryan wrote: >> 2016-08-10 19:03 GMT+03:00 Alex Rousskov >> <rouss...@measurement-factory.com>: >> >>> As Amos has noted, we do need to restore the old "unknown&q

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-10 Thread Alex Rousskov
On 08/09/2016 06:19 PM, Henrik Nordström wrote: > tis 2016-08-09 klockan 11:47 -0600 skrev Alex Rousskov: >> >> Yep, that matches both my understanding and motivation to return ERR >> in the explicitly configured on-persistent-overload=err case. > I'd say make it configur

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-09 Thread Alex Rousskov
On 08/09/2016 11:39 AM, Amos Jeffries wrote: > On 10/08/2016 4:41 a.m., Alex Rousskov wrote: >> On 08/09/2016 05:38 AM, Eduard Bagdasaryan wrote: >>> On 08/08/2016 02:17 PM, Amos Jeffries wrote: >>>> * helper::SubmissionFailure is also changing what was previously &g

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-09 Thread Alex Rousskov
On 08/09/2016 05:38 AM, Eduard Bagdasaryan wrote: > On 08/08/2016 02:17 PM, Amos Jeffries wrote: >> * helper::SubmissionFailure is also changing what was previously > Helper::Unknown result codes to Helper::Error. > - Helper::Error is one of the helper output codes, it means success. > Obviousy

Re: [squid-dev] [PATCH] Ipc::MemMap::ttl removal

2016-08-08 Thread Alex Rousskov
On 08/08/2016 08:12 AM, Amos Jeffries wrote: > Coverity Scan latest checks are reporting that the ttl member of > Ipc::MemMap is being left uninitialized. > > It sounds like something which would lead to major bugs. Except that it > turns out, AFAICS, that this ttl member is never actually being

Re: [squid-dev] [RFC] eCAP auto-enable

2016-08-08 Thread Alex Rousskov
On 08/08/2016 08:06 AM, Amos Jeffries wrote: > IMO, eCAP has pretty much stabilized. We will need a new major eCAP version/release to accommodate backwards-incompatible C++11 builds as discussed at http://bugs.squid-cache.org/show_bug.cgi?id=4376#c19

Re: [squid-dev] [PATCH] Broken trunk rev14778

2016-08-08 Thread Alex Rousskov
On 08/08/2016 01:19 PM, Amos Jeffries wrote: > On 9/08/2016 6:01 a.m., Alex Rousskov wrote: >> On 08/08/2016 04:43 AM, Amos Jeffries wrote: >> >>> r14778: Move static member Last into change() method to avoid >>> initialization order >>> errors whe

Re: [squid-dev] [PATCH] Broken trunk rev14778

2016-08-08 Thread Alex Rousskov
On 08/08/2016 04:43 AM, Amos Jeffries wrote: > r14778: Move static member Last into change() method to avoid > initialization order > errors when a caller uses a global InstanceId object before the library > instantiating its template is initialized. Have you seen these Last errors?

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/04/2016 03:40 AM, Amos Jeffries wrote: > On 4/08/2016 5:57 p.m., Amos Jeffries wrote: > I'm also wondering if it would be useful to add debugs() in the Get/Set > functions for debugging session resume usage. If we do not have that already, I think it would be very useful to add debugging

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/05/2016 02:13 PM, Amos Jeffries wrote: > On 6/08/2016 6:37 a.m., Alex Rousskov wrote: >> On 08/03/2016 11:57 PM, Amos Jeffries wrote: >>> +Security::SetSessionResumeData(const Security::SessionPointer , const >>> Security::SessionStatePointer

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/03/2016 11:57 PM, Amos Jeffries wrote: > +Security::SetSessionResumeData(const Security::SessionPointer , const > Security::SessionStatePointer ) > +{ > +if (data) { > +#if USE_OPENSSL > +(void)SSL_set_session(s.get(), data.get()); > +#elif USE_GNUTLS > +

[squid-dev] [PREVIEW] Fixed reporting of NULL header characters

2016-08-04 Thread Alex Rousskov
Hello, Our Level-1 "WARNING: HTTP header contains NULL characters" messages were broken as was the level-7 reporting of the headers being parsed. Level-2 reporting of "HTTP Server RESPONSE" headers (and probably raw data in other contexts) was and still is broken. These lying-debugging

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr WAS: Re: Broken trunk after r14735

2016-07-30 Thread Alex Rousskov
On 07/30/2016 07:03 AM, Amos Jeffries wrote: > On 30/07/2016 6:29 a.m., Alex Rousskov wrote: >> On 07/29/2016 09:27 AM, Amos Jeffries wrote: >>>>> typedef std::unique_ptr<BIO, std::function<decltype(BIO_free)>> >>>>> BIO_Pointer; >> >

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr fixing r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 04:56 PM, Alex Rousskov wrote: > On 07/29/2016 12:29 PM, Alex Rousskov wrote: > I found two macro-free ways to do this. The so called "smart" one does > most of the work for us, but requires repeating the function name twice, > once with decltype() and once wit

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr fixing r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 12:29 PM, Alex Rousskov wrote: > If possible, we should avoid macros and should learn how to use C++11 > correctly. In general, it makes little sense to suffer the pains of > switching to C++11 and then use macros for things C++11 is supposed to > provide or supp

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr WAS: Re: Broken trunk after r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 09:27 AM, Amos Jeffries wrote: >>> typedef std::unique_ptr> BIO_Pointer; > I got this config parsing crash replicated here and tried a dozen or so > combinations. It does seem to keep coming back to my earlier approach of > using per-type

Re: [squid-dev] Broken trunk after r14735

2016-07-25 Thread Alex Rousskov
On 07/24/2016 01:04 AM, Amos Jeffries wrote: > does replacing "BIO_free" with "BIO_vfree" in the ssl/gadgets.h > definition of BIO_POinter fix this one? Same startup exception (quoted below) after patching trunk revision 14756 with > -typedef std::unique_ptr

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-24 Thread Alex Rousskov
On 07/23/2016 08:55 AM, Amos Jeffries wrote: > Applied to trunk as rev.14755 And thank you for fixing the override inconsistency bug. Alex. ___ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-21 Thread Alex Rousskov
On 07/20/2016 05:27 PM, Eduard Bagdasaryan wrote: > We do not have a 'getter' for receivedFirstByte_. It easy to add it > of course, but I assume the current receivedFirstByte() should be > refactored then and renamed. Adding a getter is not going to be easy, is outside your project scope, and

Re: [squid-dev] [RFC] [PREVIEW] LockingPointer round 3.

2016-07-21 Thread Alex Rousskov
On 07/21/2016 07:58 AM, Amos Jeffries wrote: > void resetWithoutLocking(T *t) { > +#if USE_OPENSSL > +assert(!t || t->references > 0); > +assert(!raw || raw->references > 0); > +if (raw && t == raw) { > +assert(raw->references > 1); // us plus caller locks

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-20 Thread Alex Rousskov
On 07/20/2016 10:04 AM, Christos Tsantilas wrote: > Why do we need common types for both SDKs? You have answered your own question below: > The only type needed by squid for openSSL is the "SSL *" which is stored > inside fde class. And the gnutls_session_int for gnutls. These are > should be

Re: [squid-dev] [RFC] [PREVIEW] LockingPointer round 3.

2016-07-20 Thread Alex Rousskov
On 07/19/2016 10:45 PM, Amos Jeffries wrote: > On 19/07/2016 7:14 p.m., Amos Jeffries wrote: >> On 19/07/2016 6:58 a.m., Christos Tsantilas wrote: >>> On 07/18/2016 08:32 PM, Alex Rousskov wrote: >>>> I can only repeat my earlier suggestions to hide that dan

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/20/2016 09:48 AM, Alex Rousskov wrote: > * Transients are needed for SMP caching to work. Correction for the first line, splitting it into two lines: - Caching is needed for collapsed forwarding to work. - Transients are needed for SMP collapsed forwarding to work. Adjusted summ

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/17/2016 08:05 AM, Eduard Bagdasaryan wrote: > +/// whether this storage is capable of serving multiple workers > +virtual bool smpAware() const = 0; The description is correct, but let's also document that smpAware()ness does not say anything about non-SMP support, in case somebody

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/20/2016 07:21 AM, Amos Jeffries wrote: > Probably more a question for Alex; > whats the point of UsingSmp() in determining transients > initialization? I would expect collapsing to be doable in both SMP and > non-SMP modes. You are correct: Basic collapsed forwarding works in both SMP and

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-20 Thread Alex Rousskov
On 07/19/2016 10:36 PM, Amos Jeffries wrote: > On 20/07/2016 5:01 a.m., Alex Rousskov wrote: >> On 07/19/2016 08:10 AM, Amos Jeffries wrote: >>> On 20/07/2016 1:44 a.m., Eduard Bagdasaryan wrote: >>>> 2016-07-19 16:17 GMT+03:00 Amos Jeffries: >>>>>

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-19 Thread Alex Rousskov
On 07/19/2016 01:14 AM, Amos Jeffries wrote: > PS. Alex is the other r14735 issue still present in current trunk now > that r14726 is reverted? No, same problem with trunk r14748: > terminate called after throwing an instance of 'std::bad_function_call' > what(): bad_function_call > >

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-19 Thread Alex Rousskov
On 07/19/2016 08:10 AM, Amos Jeffries wrote: > On 20/07/2016 1:44 a.m., Eduard Bagdasaryan wrote: >> 2016-07-19 16:17 GMT+03:00 Amos Jeffries: >>> Is this patch going to include the new config option to prevent logging >>> the new things? or do it in a followup? >> >> For now we are not planning

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-19 Thread Alex Rousskov
On 07/19/2016 12:52 AM, Amos Jeffries wrote: > 4) designing our code to use an abstraction API that renames all the > library structures and functions to some thing we understand easier **. If multi-library support is needed, and there is no existing usable generic wrapper, then this is the only

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-18 Thread Alex Rousskov
On 07/18/2016 05:12 AM, Christos Tsantilas wrote: > I must say that I am worrying a lot for all of these changes. > It is very difficult for me to follow them, and already I have > difficulties to read and debug squid openSSL relate code. > > We are using our own naming scheme for openSSL

Re: [squid-dev] [RFC] "Splicing" bumped requests to resolve\workaround WebSockets issues.

2016-07-18 Thread Alex Rousskov
On 07/17/2016 02:34 PM, Eliezer Croitoru wrote: > I remember something's vaguely and this is why I didn't quote anything. > I tried searching for something in the squid-dev list or irc but I couldn't > found it. For the future, I hope you will document your vague memories without saying that

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-18 Thread Alex Rousskov
On 07/18/2016 08:49 AM, Christos Tsantilas wrote: > On 07/18/2016 02:12 PM, Christos Tsantilas wrote: >> On 07/16/2016 03:56 PM, Amos Jeffries wrote: >>> On 16/07/2016 7:02 a.m., Alex Rousskov wrote: >>>> * After r14726 (GnuTLS: support for TLS session resume):

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-18 Thread Alex Rousskov
On 07/17/2016 03:34 AM, Amos Jeffries wrote: > On 16/07/2016 2:40 a.m., Eduard Bagdasaryan wrote: >> +// do not log connections that sent us no bytes (TODO: make >> configurable) >> +// do not log connections that closed after a transaction (those are >> normal) >> +// XXX: We assume

Re: [squid-dev] [RFC] "Splicing" bumped requests to resolve\workaround WebSockets issues.

2016-07-17 Thread Alex Rousskov
On 07/15/2016 04:29 AM, Eliezer Croitoru wrote: > The issue: > > Clients are issuing secured connections which contains WebSockets > internally and squid HTTP parsing breaks these connections. > Another related issue which deserves attention: > > Certificate pinning and connection breakage. >

Re: [squid-dev] [RFC] reduce MISS on transients collision

2016-07-17 Thread Alex Rousskov
On 07/17/2016 12:59 PM, Alex Rousskov wrote: > On 07/17/2016 05:01 AM, Amos Jeffries wrote: >> I've just been looking at the Store::Controller::find() implementation >> and it struck me that if the transients lookup has an error the object >> will fail to HIT on any e

Re: [squid-dev] [RFC] reduce MISS on transients collision

2016-07-17 Thread Alex Rousskov
On 07/17/2016 05:01 AM, Amos Jeffries wrote: > I've just been looking at the Store::Controller::find() implementation > and it struck me that if the transients lookup has an error the object > will fail to HIT on any existing cache entries. If the transients table tells us that the transient

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-16 Thread Alex Rousskov
On 07/16/2016 06:56 AM, Amos Jeffries wrote: > On 16/07/2016 7:02 a.m., Alex Rousskov wrote: >> * After r14726 (GnuTLS: support for TLS session resume): Squid segfaults >> when attempting to connect to a Secure ICAP service. Official Squid >> v4.0.12 suffers from this bug

[squid-dev] Broken trunk after r14735, r14726

2016-07-15 Thread Alex Rousskov
Hello, There are two more recent changes that broke trunk: * After r14735 (Replaced TidyPointer with std::unique_ptr), Squid cannot start due to an "std::bad_function_call" exception. * After r14726 (GnuTLS: support for TLS session resume): Squid segfaults when attempting to connect to a

Re: [squid-dev] [PATCH] Fetch missing certificates

2016-07-15 Thread Alex Rousskov
On 07/15/2016 02:14 AM, Amos Jeffries wrote: > On 15/07/2016 3:07 a.m., Alex Rousskov wrote: >> On 07/14/2016 05:16 AM, Amos Jeffries wrote: >>> * since certsDownloads is apparently constrained to values up to >>> MaxCertsDownloads. Can we please use a small integer ty

Re: [squid-dev] [PATCH] Fetch missing certificates

2016-07-14 Thread Alex Rousskov
On 07/13/2016 10:48 AM, Christos Tsantilas wrote: > On 07/11/2016 10:13 PM, Alex Rousskov wrote: >> On 07/11/2016 10:18 AM, Christos Tsantilas wrote: >>> +SBuf object; >>> +Http::StatusCode status; >>> +}; >> >> If you can make

Re: [squid-dev] [PATCH] Fetch missing certificates

2016-07-14 Thread Alex Rousskov
On 07/14/2016 05:16 AM, Amos Jeffries wrote: > * the debugs lines indicating constructor and destructor have been run > need to be symmetrical and name the object type. > > - They are there for the find-alive.pl script, so need to match the > pattern it is searching for: > eg. debugs(33, 6,

Re: [squid-dev] [RFC] annotate_transaction ACL

2016-07-12 Thread Alex Rousskov
On 07/12/2016 12:59 AM, Amos Jeffries wrote: > On 11/07/2016 5:27 p.m., Alex Rousskov wrote: >>>> * acl aclname annotate_client key value [fast] >> One [documented] problem is that !foo will still annotate, which is a >> little counter-intuitive, but I cannot think of

Re: [squid-dev] HTTP meetup in Stockholm

2016-07-11 Thread Alex Rousskov
On 07/10/2016 04:33 AM, Kinkie wrote: > at the end of the month I will attend the HTTP meetup in Stockholm. > Besides having a chance to see Henrik, I'd like to collect your feedback > and opinions on the topic that are likely to be touched. > > Currently there is rather hot discussion on the

Re: [squid-dev] [PATCH] Fetch missing certificates

2016-07-11 Thread Alex Rousskov
On 07/11/2016 10:18 AM, Christos Tsantilas wrote: > +/// The maximum allowed object size. > +static const size_t MaxObjectSize = 1*1024*1024; > +bool existingContent = reply ? reply->content_length : 0; > +bool exceedSize = (existingContent > -1 && (size_t)existingContent > >

Re: [squid-dev] [PATCH] Fetch missing certificates

2016-07-11 Thread Alex Rousskov
On 07/11/2016 10:18 AM, Christos Tsantilas wrote: > This patch includes a Downloader class which implemented as independent > AsyncJob class (in the initial patch was a ConnStateData kid). > > Currently runs an other related discussion under the mail thread "Care > and feeding of ConnStateData",

Re: [squid-dev] [PATCH Bug 4534 and N-bit fixes for CacheDigest

2016-07-11 Thread Alex Rousskov
On 07/10/2016 04:08 AM, Amos Jeffries wrote: > we are going to have > to decide if it is reasonable to have extremely large Cache Digest masks > (several tens of GB or memory). IMO it is very reasonable if the admin wants/needs large Cache Digests. In some setups, occasionally transferring a few

Re: [squid-dev] [RFC] annotate_transaction ACL

2016-07-10 Thread Alex Rousskov
On 07/09/2016 05:47 PM, Amos Jeffries wrote: > On 10/07/2016 7:14 a.m., Alex Rousskov wrote: >> >> B. Add general ACL options to be able to force any existing ACL to add >> an annotation: >> >> acl myOldAcl dst --annotate foo=bar 127.0.0.1/32 >> &g

Re: [squid-dev] [PATCH] TidyPointer removal

2016-07-10 Thread Alex Rousskov
On 07/10/2016 02:02 AM, Amos Jeffries wrote: > On 10/07/2016 2:38 p.m., Alex Rousskov wrote: >> On 07/09/2016 07:10 AM, Amos Jeffries wrote: >>> On 9/07/2016 11:18 a.m., Alex Rousskov wrote: >>>> On 07/08/2016 12:44 AM, Amos Jeffries wrote: >>>>>

Re: [squid-dev] [PATCH] TidyPointer removal

2016-07-09 Thread Alex Rousskov
On 07/09/2016 07:10 AM, Amos Jeffries wrote: > On 9/07/2016 11:18 a.m., Alex Rousskov wrote: >> On 07/08/2016 12:44 AM, Amos Jeffries wrote: >>> On 8/07/2016 11:24 a.m., Alex Rousskov wrote: >>>>> >>>>> +void resetWithoutLocking(T *t) {

Re: [squid-dev] Care and feeding of ConnStateData

2016-07-09 Thread Alex Rousskov
On 07/08/2016 08:20 PM, Amos Jeffries wrote: > On 9/07/2016 6:19 a.m., Alex Rousskov wrote: >> On 07/07/2016 04:16 PM, Amos Jeffries wrote: >>> Whichever way we go what the ::Server needs is: >> ... Snipped to avoid discussing complex design issues irrelevant for

[squid-dev] [RFC] annotate_transaction ACL

2016-07-09 Thread Alex Rousskov
Hello, I propose adding two new ACLs: annotate_transaction and annotate_client[_connection]. Their draft documentation and usage examples are provided at the end of the email. The motivation for adding these ACLs is a persistent stream of requests from admins that want to know whether Squid

<    1   2   3   4   5   6   7   8   >