]> err.no Git - varnish/log
varnish
16 years agoAdd a test-case for VCL purging
phk [Thu, 31 Jul 2008 14:59:06 +0000 (14:59 +0000)]
Add a test-case for VCL purging

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3046 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplanation
phk [Thu, 31 Jul 2008 12:53:40 +0000 (12:53 +0000)]
Explanation

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3045 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoComplete the separation of synthetic from received objects.
phk [Thu, 31 Jul 2008 12:50:36 +0000 (12:50 +0000)]
Complete the separation of synthetic from received objects.

Any object, also errors, we receive from the backend will
go to vcl_fetch(), and can be cached if desired.

Any object we create, for instance if we cannot contact the
backend, will go to vcl_error() and will not be cached.

Technical details:

Implement VCL variable setting for booleans like obj.cacheable.

Remove obj.valid, only valid objects go to vcl_fetch now.

On fetch failure, drop the object and go to STP_ERROR with 503

Update testcase b00015.vtc accordingly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3044 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoOk, 3 retries then...
phk [Thu, 31 Jul 2008 10:35:35 +0000 (10:35 +0000)]
Ok, 3 retries then...

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3043 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRetry client connects once.
phk [Thu, 31 Jul 2008 10:24:19 +0000 (10:24 +0000)]
Retry client connects once.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3042 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd uptime to varnishstat -1 output
tfheen [Thu, 31 Jul 2008 10:19:44 +0000 (10:19 +0000)]
Add uptime to varnishstat -1 output

Make varnishstat -1 also output the uptime.

Closes #68

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3041 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAn assert to convince FlexeLint that we have a variable.
phk [Thu, 31 Jul 2008 10:03:27 +0000 (10:03 +0000)]
An assert to convince FlexeLint that we have a variable.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3040 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't write to read-only structure members in the shared object
phk [Thu, 31 Jul 2008 10:01:36 +0000 (10:01 +0000)]
Don't write to read-only structure members in the shared object
definition structure.

Fixes ticket 285

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3039 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAccept ECONNRESET when closing sockets during cleanup.
phk [Thu, 31 Jul 2008 09:52:27 +0000 (09:52 +0000)]
Accept ECONNRESET when closing sockets during cleanup.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3038 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake separate stats counters for number of object checked against purges
phk [Thu, 31 Jul 2008 09:25:25 +0000 (09:25 +0000)]
Make separate stats counters for number of object checked against purges
and number of regexps checked.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3037 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexelint silencing
phk [Thu, 31 Jul 2008 09:24:25 +0000 (09:24 +0000)]
Flexelint silencing

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3036 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoCheck that we found a variable before using it.
phk [Thu, 31 Jul 2008 09:23:28 +0000 (09:23 +0000)]
Check that we found a variable before using it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3035 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoWe don't actually use miniobj.h, we do the same thing internally.
phk [Thu, 31 Jul 2008 09:22:46 +0000 (09:22 +0000)]
We don't actually use miniobj.h, we do the same thing internally.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3034 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexeLint polishing.
phk [Thu, 31 Jul 2008 09:09:20 +0000 (09:09 +0000)]
FlexeLint polishing.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3033 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd statistics about regexp purges.
phk [Wed, 30 Jul 2008 15:34:38 +0000 (15:34 +0000)]
Add statistics about regexp purges.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3032 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTry to connect to CLI 30 times rather than 10 to avoid some timeout errors.
tfheen [Wed, 30 Jul 2008 12:18:57 +0000 (12:18 +0000)]
Try to connect to CLI 30 times rather than 10 to avoid some timeout errors.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3031 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd cache_backend.h to the list of headers that go in the tarball; fixes build failure
tfheen [Wed, 30 Jul 2008 10:53:38 +0000 (10:53 +0000)]
Add cache_backend.h to the list of headers that go in the tarball; fixes build failure

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3030 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoForgot to add this file.
phk [Sun, 27 Jul 2008 14:36:03 +0000 (14:36 +0000)]
Forgot to add this file.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3029 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoChange param thread_pool_min to be the minimum number of threads per
phk [Fri, 25 Jul 2008 19:23:35 +0000 (19:23 +0000)]
Change param thread_pool_min to be the minimum number of threads per
pool, and don't be so stingy with them: default to five.

Make sure we really do create the minimum complement of threads.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3028 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoNB: Be careful with -trunk, this is a quite intrusive change.
phk [Fri, 25 Jul 2008 18:20:35 +0000 (18:20 +0000)]
NB: Be careful with -trunk, this is a quite intrusive change.

Continue the progress on synthetic/error pages

The default "guru meditation" is now generated from the vcl_error {}
function, which can be redefined to whatever suits your taste.

Techinical:

Add new vcl_error method and make variables available in it.

Fix a bug in "error" action, where the numeric argument would not get
interpreted correctly if it came from a variable like obj.status.

Forbid "error" action in vcl_deliver since vcl_error now goes to
vcl_deliver to send the error object.

Fix test v00001 to reflect this.

Move the obj->ws/http initialization to preallocation time to avoid
duplication.

Add read-only variable req.xid (a string!)

Add default guru meditation to default vcl.

Remove cache_synthetic.c which is now unecessary.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3027 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a facility to constructing a synthetic object from VCL.
phk [Fri, 25 Jul 2008 16:33:04 +0000 (16:33 +0000)]
Add a facility to constructing a synthetic object from VCL.

This is just the initial version and it doesn't quite work the way
we need it to yet, but the idea is to be able to say:

sub vcl_fetch {
    if (obj.status == 503) {
synthetic {"
    <HTML>
    <H1>Sorry, could not contact the backend server</H1>
    <P>
Try again later.
    </P>
    <HR>
    <PRE>
URL: "}  req.url {"
User Agnet: "} req.http.user-agent {"
    </PRE>
    </HTML>
"};
    }
}

A new VCL syntactic element have been introduced to do this: "the
long string".   A long string is anything from {" to "}, newlines,
controlcharacters and all.  (Normal "..." strings cannot contain
control characters.

Technical details:

Don't NULL terminate string sequences in VRT context, we may have
NULL cropping up as a legal value if a header is missing, add the
magic "vrt_magic_string_end" for terminating string contactenation.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3026 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a stevedore for synthetic pages.
phk [Fri, 25 Jul 2008 15:27:04 +0000 (15:27 +0000)]
Add a stevedore for synthetic pages.

The storage from this stevedore is backed by an autoextending vsb, which
can be used to generate synthetic pages into.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3025 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoGive VSB's the mini-obj/magic treatment and enable asserts in general.
phk [Fri, 25 Jul 2008 14:53:08 +0000 (14:53 +0000)]
Give VSB's the mini-obj/magic treatment and enable asserts in general.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3024 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoNeuter test b00015 so that automatic scripts don't trip on it all
phk [Fri, 25 Jul 2008 14:52:08 +0000 (14:52 +0000)]
Neuter test b00015 so that automatic scripts don't trip on it all
the time.

To be reenabled when the code supports the desired functionality.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3023 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agopolish dot graph a bit.
phk [Fri, 25 Jul 2008 13:39:01 +0000 (13:39 +0000)]
polish dot graph a bit.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3022 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFigure out if we need O_LARGEFILE to be compatible with 1990 or later
phk [Fri, 25 Jul 2008 12:02:11 +0000 (12:02 +0000)]
Figure out if we need O_LARGEFILE to be compatible with 1990 or later
size disks.

Submitted by: wichert

Fixes ticket 283

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3021 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRelax an assert to only check what we really care about, and not the
phk [Thu, 24 Jul 2008 22:20:10 +0000 (22:20 +0000)]
Relax an assert to only check what we really care about, and not the
principle of the situation.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3020 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon my peril sensitive sun-glasses, and go over the TTL calculation
phk [Thu, 24 Jul 2008 22:12:41 +0000 (22:12 +0000)]
Don my peril sensitive sun-glasses, and go over the TTL calculation
routine.

Follow RFC2616 more closely, and make relative (ie: max-age) specifications
take precedence over absolute specifications (Expires:)

Add an explicit clock-skew window (parameter: clock_skew) and only
interpret Expires: in absolute terms if the Date: header is inside
this window.

Explicit check for the case where the backend sends an Expires: which
is before the Date:, even if the Date: is out side our window.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3019 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake the ESI testcases start with an XML tag to satsify our new
phk [Thu, 24 Jul 2008 22:09:25 +0000 (22:09 +0000)]
Make the ESI testcases start with an XML tag to satsify our new
non-XML detector logic.

Add a testcase to see if it works and that we can override it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3018 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUse "localhost" in our acls, so it works no matter which address it
phk [Thu, 24 Jul 2008 21:55:56 +0000 (21:55 +0000)]
Use "localhost" in our acls, so it works no matter which address it
picks off your loopback interface.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3017 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a check to avoid doing ESI parsing of objects that do not look
phk [Thu, 24 Jul 2008 20:39:04 +0000 (20:39 +0000)]
Add a check to avoid doing ESI parsing of objects that do not look
like XML.  Our definition of "looks like XML" is that the first
non-white-space character is '<'.

Add a new parameter "esi_syntax" with bits to steer the ESI parser.

Use the first bit to disable the "looks like XML" check.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3016 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoProperly truncate bytes before hexdumping.
phk [Thu, 24 Jul 2008 20:16:04 +0000 (20:16 +0000)]
Properly truncate bytes before hexdumping.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3015 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTest caching of synthetic error pages (broken since 2266). This will need revisiting...
des [Thu, 24 Jul 2008 12:33:32 +0000 (12:33 +0000)]
Test caching of synthetic error pages (broken since 2266).  This will need revisiting once caching has been reimplemented.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3014 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoSet svn:keywords
des [Thu, 24 Jul 2008 12:24:17 +0000 (12:24 +0000)]
Set svn:keywords

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3013 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoSet svn:keywords on files that didn't already have it
des [Thu, 24 Jul 2008 12:22:35 +0000 (12:22 +0000)]
Set svn:keywords on files that didn't already have it

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3012 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFix temp file names
des [Thu, 24 Jul 2008 12:21:30 +0000 (12:21 +0000)]
Fix temp file names

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3011 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoCorrect copyright statement.
des [Thu, 24 Jul 2008 11:23:16 +0000 (11:23 +0000)]
Correct copyright statement.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3010 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReindent
des [Thu, 24 Jul 2008 11:21:35 +0000 (11:21 +0000)]
Reindent

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3009 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMarkup
des [Thu, 24 Jul 2008 11:04:46 +0000 (11:04 +0000)]
Markup

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3008 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake the manager respect the diag_bitmap for child core creation.
phk [Wed, 23 Jul 2008 21:10:17 +0000 (21:10 +0000)]
Make the manager respect the diag_bitmap for child core creation.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3007 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoPrevent loading multiple VCL's with the same name if the client is not
phk [Wed, 23 Jul 2008 21:04:12 +0000 (21:04 +0000)]
Prevent loading multiple VCL's with the same name if the client is not
there to stop us.

Fixes #281

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3006 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoCopy&Paste'o
phk [Wed, 23 Jul 2008 20:57:40 +0000 (20:57 +0000)]
Copy&Paste'o

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3005 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore Flexelint nitpickery
phk [Wed, 23 Jul 2008 17:37:44 +0000 (17:37 +0000)]
More Flexelint nitpickery

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3004 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexelint nits
phk [Wed, 23 Jul 2008 17:09:53 +0000 (17:09 +0000)]
Flexelint nits

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3003 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a missing error check.
phk [Wed, 23 Jul 2008 17:04:53 +0000 (17:04 +0000)]
Add a missing error check.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3002 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoNote that this testcase may fail on linux.
phk [Wed, 23 Jul 2008 15:44:46 +0000 (15:44 +0000)]
Note that this testcase may fail on linux.

The problem is that a TCP connection to 127.0.0.1 appearantly does
not originate on the loopback interface, but on some other interface
on the machine.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3001 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoWe should not open the shm file until we have a cli connection, it
phk [Wed, 23 Jul 2008 15:34:40 +0000 (15:34 +0000)]
We should not open the shm file until we have a cli connection, it
might not be there yet.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3000 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoPrefix acl functions with "named_" and "anon_" to avoid naming conflicts.
phk [Wed, 23 Jul 2008 15:30:02 +0000 (15:30 +0000)]
Prefix acl functions with "named_" and "anon_" to avoid naming conflicts.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2999 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't make assumptions about pthread_t
phk [Wed, 23 Jul 2008 15:21:48 +0000 (15:21 +0000)]
Don't make assumptions about pthread_t

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2998 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agouse strtod() instead of strtof()
phk [Wed, 23 Jul 2008 15:20:37 +0000 (15:20 +0000)]
use strtod() instead of strtof()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2997 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agodon't make assumptions about pthread_t
phk [Wed, 23 Jul 2008 15:19:38 +0000 (15:19 +0000)]
don't make assumptions about pthread_t

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2996 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoACL code rewrite:
phk [Wed, 23 Jul 2008 15:01:54 +0000 (15:01 +0000)]
ACL code rewrite:

Add IPv6 support (untested!)

Implement evil-acls

IPv6 support
------------

I have implemented IPv6 filtering support, but I have done so blindly
as I have no IPv6 networks to test with.

Please double check before relying on this to work, and please report
your findings back to us.

Syntax
------

The ACL rules still have the same syntax, but the sematics have
expanded to handle IPv6 also:

    acl foo {

        "foohost";              // Match, if the address is one of the
                                // ipv4 or ipv6 addresses of "foohost"

        ! "foohost";            // Fail, if...

        "192.168.1.7" / 24;     // Use mask for comparison:  The '7' is
                                // ignored

// Implicit masks:
!"172.16"; // Fail 172.16.0.0 to 172.16.255.255
"10.0.0"; // Match 10.0.0.0 to 10.0.0.255

        "www.freebsd.org" / 24; // This will give compile error, because
                                // the "www.freebsd.org" has both ipv4
                                // and ipv6 addresses, and using the same
                                // mask for both kinds do not make sense.

        ( ... );                // Ignore this rule if DNS lookup fails.

        ( ! "idiot.net" );      // If we can resolve "idiot.net", then
                                // return Failure to match, if we see them.
    }

Please notice that DNS lookup happens *only* on VCL compilation, if a
DNS record changes you need to recompile (ie: vcl.load or vcl.inline)
your VCL code again, it is not enough to just switch vcl (vcl.use).

(This is the same as with backend DNS lookups)

Evil-acls
---------

Most firewall or ip-filtering facilities, compile the lists of
networks and masks to a table, and matches proceed sequentially
through that table until the table is exhausted or a match is found.

Since we compile our ACLs into C-code, we might as well implement the
"evil-acl" concept, and compile the rules directly into C-code instead.

An ACL like this:

acl foo {
"172.16";
!"172.16.17";
"172.16.17.18";
"172.16"/18;
}

Compiles to:

if (fam == 2) {
 if (a[0] == 172) {
          if (a[1] == 16) {
           if (a[2] == 17) {
            if (a[3] == 18) {
             VRT_acl_log(sp, "MATCH bar " "172.16.17.18");
             return (1);
            }
            VRT_acl_log(sp, "NEG_MATCH bar " "172.16.17");
            return (0);
           }
           else if ((a[3] & 0xc0) == 0) {
            VRT_acl_log(sp, "MATCH bar " "172.16" "/18" );
            return (1);
           }
           VRT_acl_log(sp, "MATCH bar " "172.16");
           return (1);
          }
         }
        }
VRT_acl_log(sp, "NO_MATCH bar");
return (0);

As can be seen, for example the comparison with "172" is now shared
for all four rules in the ACL, instead of being carried out once for
each of the four rules.

In addition to this optimization, the C-compiler will of course use
its usual (and unusual) tricks to speed things up, quite likely inlining
the ACL code in the VCL functions where they are referenced.

It will also be noticed, that the compiler sorts the rules in "most
specific order".

This means that:
"172.16.17.18";
gets tested before
!"172.16.17";
even though it is listed later in the ACL.

Previously we tested the rules in the order given.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2995 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUpdated the default.vcl and man page with the latest config from mgt_vcc.c.
petter [Wed, 23 Jul 2008 09:07:24 +0000 (09:07 +0000)]
Updated the default.vcl and man page with the latest config from mgt_vcc.c.
The following perl one-liner is useful:
perl -ne 'if( $print == 1 ) { exit if( /^$/ ); eval "print " . $_; } $print = 1 if /default_vcl/;' mgt_vcc.c
Fixes #135 (for now)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2994 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a counter for shmlog wraparounds.
phk [Tue, 22 Jul 2008 14:40:33 +0000 (14:40 +0000)]
Add a counter for shmlog wraparounds.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2993 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoconstage.
phk [Tue, 22 Jul 2008 14:40:13 +0000 (14:40 +0000)]
constage.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2992 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUpdated the man page with the granularity option for the file storage.
petter [Tue, 22 Jul 2008 11:12:51 +0000 (11:12 +0000)]
Updated the man page with the granularity option for the file storage.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2991 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoForce -w thread limits
phk [Tue, 22 Jul 2008 09:59:41 +0000 (09:59 +0000)]
Force -w thread limits

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2990 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agorenovate tackle_warg()
phk [Tue, 22 Jul 2008 09:57:11 +0000 (09:57 +0000)]
renovate tackle_warg()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2989 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded granularity as a subargument to the options for file storage:
petter [Tue, 22 Jul 2008 09:42:06 +0000 (09:42 +0000)]
Added granularity as a subargument to the options for file storage:
-s file,<dir_or_file>,<size>,<granularity>
Fixes #244

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2988 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoslightly more delay seems necessary for stability.
phk [Tue, 22 Jul 2008 09:02:17 +0000 (09:02 +0000)]
slightly more delay seems necessary for stability.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2987 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUse exit(4) when we don't want a panic coredump.
phk [Tue, 22 Jul 2008 08:37:41 +0000 (08:37 +0000)]
Use exit(4) when we don't want a panic coredump.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2986 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a testcase which panics the child, see the manager restart it.
phk [Tue, 22 Jul 2008 08:21:29 +0000 (08:21 +0000)]
Add a testcase which panics the child, see the manager restart it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2985 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a "panic" vcl command, which does what you would expect.
phk [Tue, 22 Jul 2008 08:06:16 +0000 (08:06 +0000)]
Add a "panic" vcl command, which does what you would expect.

Takes a string argument, so it is possible to do:

 panic "Trouble with " req.url " (not the way I expected it!);

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2984 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded the variable server.port that holds the port on which the server has answered...
petter [Tue, 22 Jul 2008 07:52:00 +0000 (07:52 +0000)]
Added the variable server.port that holds the port on which the server has answered the request in the same way that server.ip holds the IP number. Fixes #264.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2983 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a cli_quote() function for quoting a string properly when reporting
phk [Tue, 22 Jul 2008 07:37:32 +0000 (07:37 +0000)]
Add a cli_quote() function for quoting a string properly when reporting
it in the CLI.

Use it for cc_command and listen_address parameters

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2982 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAccept comma separation for the -a subargs for consistency with -s and -h
phk [Tue, 22 Jul 2008 07:19:40 +0000 (07:19 +0000)]
Accept comma separation for the -a subargs for consistency with -s and -h

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2981 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAlso check the "stats" command.
phk [Sun, 20 Jul 2008 20:24:37 +0000 (20:24 +0000)]
Also check the "stats" command.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2980 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAlso dump workspaces in panic.
phk [Sun, 20 Jul 2008 12:03:14 +0000 (12:03 +0000)]
Also dump workspaces in panic.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2979 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoIgnore a couple of return values
phk [Sun, 20 Jul 2008 11:44:29 +0000 (11:44 +0000)]
Ignore a couple of return values

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2978 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd diag_bitmap controls for panic behaviour.
phk [Sun, 20 Jul 2008 11:40:30 +0000 (11:40 +0000)]
Add diag_bitmap controls for panic behaviour.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2977 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove the session-specific assert facility, the general assert facility
phk [Sun, 20 Jul 2008 11:28:40 +0000 (11:28 +0000)]
Remove the session-specific assert facility, the general assert facility
dumps details now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2976 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReconstitute the dumping of sessions, objects &c &c, but now do it for
phk [Sun, 20 Jul 2008 11:28:10 +0000 (11:28 +0000)]
Reconstitute the dumping of sessions, objects &c &c, but now do it for
all asserts from a thread with a registered session.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2975 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agopanicstr is deliberately not static
phk [Sun, 20 Jul 2008 11:24:57 +0000 (11:24 +0000)]
panicstr is deliberately not static

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2974 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove debug hack which sneaked in.
phk [Sun, 20 Jul 2008 10:46:00 +0000 (10:46 +0000)]
Remove debug hack which sneaked in.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2973 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReport thread name and thread session in panic messages.
phk [Sun, 20 Jul 2008 10:45:09 +0000 (10:45 +0000)]
Report thread name and thread session in panic messages.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2972 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake room in the shared memory segment for a panic string
phk [Sun, 20 Jul 2008 10:36:28 +0000 (10:36 +0000)]
Make room in the shared memory segment for a panic string
buffer.

Replace the default libvarnish assert handler with a child specific
function.

This function which fills the static panic string and copy the
result to the shared memory panicstring.

In the manager process, report the content of the panic string
when the child dies.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2971 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake the backend function of libvarnish' assert facilities pluggable.
phk [Sun, 20 Jul 2008 10:03:42 +0000 (10:03 +0000)]
Make the backend function of libvarnish' assert facilities pluggable.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2970 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoStore the current session in thread private data.
phk [Sun, 20 Jul 2008 09:57:25 +0000 (09:57 +0000)]
Store the current session in thread private data.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2969 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore assorted FlexeLint polishing
phk [Sat, 19 Jul 2008 12:38:28 +0000 (12:38 +0000)]
More assorted FlexeLint polishing

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2968 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTechnically speaking, vsb_len() could return -1, except it won't because
phk [Sat, 19 Jul 2008 12:04:25 +0000 (12:04 +0000)]
Technically speaking, vsb_len() could return -1, except it won't because
of the vsb_overflow() assert.

Make this explicit for FlexeLint.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2967 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplain to FlexeLint that _storage is not referenced.
phk [Sat, 19 Jul 2008 12:03:16 +0000 (12:03 +0000)]
Explain to FlexeLint that _storage is not referenced.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2966 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoConstify WS_Free()
phk [Sat, 19 Jul 2008 11:50:09 +0000 (11:50 +0000)]
Constify WS_Free()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2965 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplicitly specify index in name array.
phk [Sat, 19 Jul 2008 11:49:43 +0000 (11:49 +0000)]
Explicitly specify index in name array.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2964 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDeal appropriately with ParseArgv returning NULL
phk [Sat, 19 Jul 2008 11:44:41 +0000 (11:44 +0000)]
Deal appropriately with ParseArgv returning NULL

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2963 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplicitly silence three FlexeLint complaints
phk [Sat, 19 Jul 2008 11:43:51 +0000 (11:43 +0000)]
Explicitly silence three FlexeLint complaints

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2962 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexeLint inspired polishing:
phk [Sat, 19 Jul 2008 11:38:31 +0000 (11:38 +0000)]
FlexeLint inspired polishing:

Better choice of data types.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2961 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexeLint inspired polishing:
phk [Sat, 19 Jul 2008 11:33:24 +0000 (11:33 +0000)]
FlexeLint inspired polishing:

Detect empty args.
Handle 'b' suffix in switch.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2960 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a protocol version number ("1.0") to the ping response.
phk [Sat, 19 Jul 2008 10:40:13 +0000 (10:40 +0000)]
Add a protocol version number ("1.0") to the ping response.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2959 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUnused struct member.
phk [Sat, 19 Jul 2008 09:51:41 +0000 (09:51 +0000)]
Unused struct member.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2958 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove pointless volatile
phk [Sat, 19 Jul 2008 09:50:42 +0000 (09:50 +0000)]
Remove pointless volatile

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2957 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't constify the cli argument to cli_out()
phk [Sat, 19 Jul 2008 09:44:40 +0000 (09:44 +0000)]
Don't constify the cli argument to cli_out()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2956 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoWash & cleaning of the -h and -s argument handling.
phk [Sat, 19 Jul 2008 09:24:07 +0000 (09:24 +0000)]
Wash & cleaning of the -h and -s argument handling.

No functional changes.

Add ARGV_ERR() macro for reporting argument trouble.

Do selection of method in varnishd.c, using generic choice function.

Split subarguments into argc+argv at commans, and pass those down to
avoid repetitive and bogus string munging.

Catch more error conditions with respect to subarguments.

Add mini_obj magics to stevedores and slingers.

Generally tidy up along the way.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2955 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAugment ParseArgv() to also split comma separated lists.
phk [Sat, 19 Jul 2008 07:19:12 +0000 (07:19 +0000)]
Augment ParseArgv() to also split comma separated lists.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2954 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAvoid home-rolled circular list in stevedore, use regular VTAILQ,
phk [Sat, 19 Jul 2008 06:46:42 +0000 (06:46 +0000)]
Avoid home-rolled circular list in stevedore, use regular VTAILQ,
the microoptimization does not justify the manual handling of ->prev
and ->next.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2953 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agotypo.
phk [Sat, 19 Jul 2008 06:43:34 +0000 (06:43 +0000)]
typo.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2952 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoPolish the tokenizer
phk [Fri, 18 Jul 2008 21:30:01 +0000 (21:30 +0000)]
Polish the tokenizer

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2951 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoThere was no need to send the err_ttl as parameter as SYN_ErrorPage had access to...
petter [Fri, 18 Jul 2008 07:16:45 +0000 (07:16 +0000)]
There was no need to send the err_ttl as parameter as SYN_ErrorPage had access to the it directly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2950 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded the parameter err_ttl, which sets the TTL for synthesized error pages. Default...
petter [Fri, 18 Jul 2008 07:01:42 +0000 (07:01 +0000)]
Added the parameter err_ttl, which sets the TTL for synthesized error pages. Default value is 0. Fixes #126.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2949 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded support for choosing what fields to show in varniststat. This is done by using...
petter [Thu, 17 Jul 2008 09:58:54 +0000 (09:58 +0000)]
Added support for choosing what fields to show in varniststat. This is done by using the new -f option. To list avaialble fields, use the new -l option. Fixes #208.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2946 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoOoops, FlexeLint was wrong, the consts are not possible.
phk [Mon, 14 Jul 2008 15:53:22 +0000 (15:53 +0000)]
Ooops, FlexeLint was wrong, the consts are not possible.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2945 d4fa192b-c00b-0410-8231-f00ffab90ce4