]> err.no Git - varnish/log
varnish
17 years agos/expl/reason/ to circumvent a bug in gcc 3.
des [Thu, 3 May 2007 08:48:43 +0000 (08:48 +0000)]
s/expl/reason/ to circumvent a bug in gcc 3.

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

17 years agos/expl/reason/ to circumvent a bug in gcc 3.
des [Thu, 3 May 2007 08:45:33 +0000 (08:45 +0000)]
s/expl/reason/ to circumvent a bug in gcc 3.

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

17 years agos/expl/reason/ to circumvent a bug in gcc 3.
des [Thu, 3 May 2007 08:41:01 +0000 (08:41 +0000)]
s/expl/reason/ to circumvent a bug in gcc 3.

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

17 years agoDon't try to lock the objhead mutex if we don't have an objhead. Doing so
des [Wed, 2 May 2007 14:37:42 +0000 (14:37 +0000)]
Don't try to lock the objhead mutex if we don't have an objhead.  Doing so
caused the Varnish child to die immediately after sending its 503 response
if the backend didn't respond.

Reviewed by: phk

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

17 years agoCorrect the URL in the error page.
des [Wed, 2 May 2007 13:56:24 +0000 (13:56 +0000)]
Correct the URL in the error page.

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

17 years agoTry fixing #95 again. The trick is that if we get a new SLT_VCL_call
des [Wed, 2 May 2007 12:20:43 +0000 (12:20 +0000)]
Try fixing #95 again.  The trick is that if we get a new SLT_VCL_call
while the F_INVCL flag is set, we need to insert a newline before the
entry for the new VCL_call.

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

17 years agoAdd and document a ping_interval parameter which controls the interval at
des [Tue, 1 May 2007 18:21:53 +0000 (18:21 +0000)]
Add and document a ping_interval parameter which controls the interval at
which the parent pings the child.  Also document pipe_timeout, which was
left out of the man page by accident.

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

17 years agoTwo minor logging fixes:
des [Tue, 1 May 2007 17:55:31 +0000 (17:55 +0000)]
Two minor logging fixes:

 - change the type of vsl_handler()'s tag argument from unsigned int to
   enum shmlogtag to allow gcc to check switch statements and gdb to show
   its value by name rather than by number.

 - fix the "missing newline after VCL_call" bug in varnishlog (#95)

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

17 years agoImprove the readability and debuggability of our tag conversion tricks.
des [Tue, 1 May 2007 17:55:13 +0000 (17:55 +0000)]
Improve the readability and debuggability of our tag conversion tricks.

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

17 years agoAdd protective #ifdef.
des [Tue, 1 May 2007 17:48:56 +0000 (17:48 +0000)]
Add protective #ifdef.

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

17 years agoForce CONFIG_SHELL to /bin/sh.
des [Thu, 26 Apr 2007 10:39:19 +0000 (10:39 +0000)]
Force CONFIG_SHELL to /bin/sh.

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

17 years agoAdd compat trick for clock_gettime()
phk [Thu, 26 Apr 2007 06:54:58 +0000 (06:54 +0000)]
Add compat trick for clock_gettime()

Submitted by: Pierre Queinnec <pierre.queinnec@zenika.com>

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

17 years agoEliminate warnings.
des [Tue, 24 Apr 2007 12:37:58 +0000 (12:37 +0000)]
Eliminate warnings.

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

17 years agoMove CFLAGS configuration to the bottom so it doesn't affect other tests.
des [Tue, 24 Apr 2007 12:36:58 +0000 (12:36 +0000)]
Move CFLAGS configuration to the bottom so it doesn't affect other tests.
This makes --enable-werror work again.

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

17 years agoMove CFLAGS configuration to the bottom so it doesn't affect other tests.
des [Tue, 24 Apr 2007 12:23:37 +0000 (12:23 +0000)]
Move CFLAGS configuration to the bottom so it doesn't affect other tests.
This makes --enable-werror work again.

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

17 years agoCorrectly detect the presence and location of all external library we use
des [Tue, 24 Apr 2007 09:39:12 +0000 (09:39 +0000)]
Correctly detect the presence and location of all external library we use
(except for the C math library, which the C standard guarantees is always
available as -lm) and more importantly, use them only where needed.

This should fix the compilation issues on SuSE.

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

17 years agoFurther eliminate fixed-size buffers.
des [Sun, 22 Apr 2007 13:09:59 +0000 (13:09 +0000)]
Further eliminate fixed-size buffers.

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

17 years agoMajor rewrite of the VSL handler for increased robustness and clarity:
des [Sat, 21 Apr 2007 21:48:56 +0000 (21:48 +0000)]
Major rewrite of the VSL handler for increased robustness and clarity:

 - Treat all request fields in a similar manner.

 - Mostly eliminate fixed-size buffers.

 - Don't print or format anything until we see ReqEnd.

 - If we saw a Host: header, use it to generate an absolute URI,
   resulting in far more useful output when processing logs from a
   server which handles multiple virtual hosts.

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

17 years agoStyle and whitespace cleanup + clarify comment explaining the log format
des [Sat, 21 Apr 2007 17:52:44 +0000 (17:52 +0000)]
Style and whitespace cleanup + clarify comment explaining the log format

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

17 years agoClarify synopsis / description
des [Sat, 21 Apr 2007 17:48:21 +0000 (17:48 +0000)]
Clarify synopsis / description

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

17 years agoWhen we have some amount of a chunk header, but not all of it, we
phk [Thu, 19 Apr 2007 15:17:35 +0000 (15:17 +0000)]
When we have some amount of a chunk header, but not all of it, we
need to read more from the fd.  The semantics we _really_ want for
that read operation is "wait until at least one char is available,
then return as many as N to us".

This can be done with a combination of system calls, but it is likely
just as cheap to just read one char at a time, so we do that.

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

17 years agoEmit acl matching code to the function body.
phk [Thu, 19 Apr 2007 10:00:37 +0000 (10:00 +0000)]
Emit acl matching code to the function body.

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

17 years agoStandards compliance: fputs(3) returns non-negative on success.
phk [Thu, 19 Apr 2007 09:34:45 +0000 (09:34 +0000)]
Standards compliance: fputs(3) returns non-negative on success.

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

17 years agoNeed to find other way to shut up flexelint.
phk [Wed, 11 Apr 2007 09:16:13 +0000 (09:16 +0000)]
Need to find other way to shut up flexelint.

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

17 years agoRemember to initialize C_flag and don't exit in far away code.
phk [Wed, 11 Apr 2007 09:09:00 +0000 (09:09 +0000)]
Remember to initialize C_flag and don't exit in far away code.

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

17 years agoAdd scripts to run flexelint over VCL compiler output
phk [Mon, 9 Apr 2007 21:08:21 +0000 (21:08 +0000)]
Add scripts to run flexelint over VCL compiler output

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

17 years agoFix stylistic Flexelint unhappiness with the compiled C source.
phk [Mon, 9 Apr 2007 21:03:12 +0000 (21:03 +0000)]
Fix stylistic Flexelint unhappiness with the compiled C source.

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

17 years agoAdd a -C argument, which compiles the VCL (either default with -b
phk [Mon, 9 Apr 2007 20:50:12 +0000 (20:50 +0000)]
Add a -C argument, which compiles the VCL (either default with -b
or user specified with -f) and outputs the C source on the stdout.

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

17 years agoTwo missing NULL initializations.
phk [Mon, 9 Apr 2007 20:34:14 +0000 (20:34 +0000)]
Two missing NULL initializations.

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

17 years ago<queue.h> is a local #include in varnish, so use "queue.h"
phk [Mon, 9 Apr 2007 20:30:05 +0000 (20:30 +0000)]
<queue.h> is a local #include in varnish, so use "queue.h"

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

17 years agoMove the function that pushes the compiled VCL programs C source through
phk [Mon, 9 Apr 2007 20:28:08 +0000 (20:28 +0000)]
Move the function that pushes the compiled VCL programs C source through
the systems cc(1) from the VCL compiler library to the varnishd process.

This reduces the VCL-compiler library to a text-procesing functionality
and makes it easier to build other tools, including test-suites,
around the VCL-compiler.

It also moves the actual compiler invocation string into the varnishd
sources, where it can be handled appropriately, possibly as a paramter.

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

17 years agoremove XXX comment which no longer applies
phk [Sun, 1 Apr 2007 19:13:07 +0000 (19:13 +0000)]
remove XXX comment which no longer applies

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

17 years agoVarious nitpicking prompted by flexelint
phk [Sun, 1 Apr 2007 19:01:38 +0000 (19:01 +0000)]
Various nitpicking prompted by flexelint

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

17 years agoFix char position in error messages to be [1...] instead of [0...]
phk [Sun, 1 Apr 2007 18:18:54 +0000 (18:18 +0000)]
Fix char position in error messages to be [1...] instead of [0...]

Fix typo in /* ... */ handling

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

17 years agoUpdate
phk [Sun, 1 Apr 2007 15:34:24 +0000 (15:34 +0000)]
Update

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

17 years agoRemove unused METHOD token.
phk [Sun, 1 Apr 2007 15:33:56 +0000 (15:33 +0000)]
Remove unused METHOD token.

Improve error handling for unterminated /* ... */ comments.

Add undocumented and unsupported facility for inline C source code
in VCL programs.  The syntax is "C{ getpid(); }C" and you are on
your own if you use this.

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

17 years agoMove backend parsing into a separate file.
phk [Sun, 1 Apr 2007 09:34:28 +0000 (09:34 +0000)]
Move backend parsing into a separate file.
Eliminate a bunch of of unnecessary #includes.

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

17 years agoEliminate the "proof of concept" tokens that were never implemented
phk [Sun, 1 Apr 2007 09:17:52 +0000 (09:17 +0000)]
Eliminate the "proof of concept" tokens that were never implemented
at runtime.

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

17 years agoImplement the returns with the new ID based table and eliminate their
phk [Sun, 1 Apr 2007 09:07:44 +0000 (09:07 +0000)]
Implement the returns with the new ID based table and eliminate their
corresponding dedicated tokens.

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

17 years agoIntroduce table based search for actions, and make "set" the first one.
phk [Sun, 1 Apr 2007 08:48:08 +0000 (08:48 +0000)]
Introduce table based search for actions, and make "set" the first one.

This eliminates the need to have the identifier "set" be its own token
rather than being a simple ID.

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

17 years agoSplit the parsing of actions into a separate file, this is the bit
phk [Sun, 1 Apr 2007 08:37:52 +0000 (08:37 +0000)]
Split the parsing of actions into a separate file, this is the bit
I expect to grow the most in the near future and all actions have
a lot more in common, than they have with conditionals etc.

Apply more vcc_ prefixes.

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

17 years agoI got confused about the terminology. An action is something we do
phk [Sun, 1 Apr 2007 08:23:48 +0000 (08:23 +0000)]
I got confused about the terminology.  An action is something we do
in the program, a "return" is when we quit the program.

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

17 years agoBetter syntax checking of "set" statements.
phk [Sat, 31 Mar 2007 18:21:14 +0000 (18:21 +0000)]
Better syntax checking of "set" statements.

Remove inapplicable comment.

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

17 years agoFix typo, so we correctly recognize '-=' as T_DECR token.
phk [Sat, 31 Mar 2007 18:20:33 +0000 (18:20 +0000)]
Fix typo, so we correctly recognize '-=' as T_DECR token.

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

17 years agoPidgin BNF syntax of VCL
phk [Sat, 31 Mar 2007 18:19:07 +0000 (18:19 +0000)]
Pidgin BNF syntax of VCL

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

17 years agoOverhaul cross reference checks in vcc compiler
phk [Sat, 31 Mar 2007 08:36:31 +0000 (08:36 +0000)]
Overhaul cross reference checks in vcc compiler

Move and isolate cross reference stuff to it's own source file
(vcc_xref.c) and use vcc_ prefix as originally intended.

Also warn about multiple definitions of objects.

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

17 years agoImprove error message layout and information.
phk [Sat, 31 Mar 2007 07:43:05 +0000 (07:43 +0000)]
Improve error message layout and information.

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

17 years agoOverhaul compiler to get rid of memory leaks and other bogons.
phk [Fri, 30 Mar 2007 21:11:15 +0000 (21:11 +0000)]
Overhaul compiler to get rid of memory leaks and other bogons.

Add a memlist to the tokenlist and a function which allocates
with malloc(3) and hangs the piece on the memlist of tokenlist.
At the end of compilation, we ditch everything on the list.

Handle vrt_obj.h like the other #includes, and stuff these
into a vsb instead of directly to a file.

Free decoded token string, if any.

Pull creation and destruction of tokenlist into separate functions
for code clarity.  Remember to destry everything in the tokenlist.

Pull invocation of cc(1) into a separate function and change the
way we do it, so we get any cc(1) groans and whines back in the
vsb so a CLI user will see them.  More errorchecks than before.

More comments throughout.

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

17 years agoRewrite using sbufs.
des [Fri, 30 Mar 2007 07:10:41 +0000 (07:10 +0000)]
Rewrite using sbufs.

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

17 years agoThe argv length calculation was not only off by one, but failed to take
des [Thu, 29 Mar 2007 10:49:58 +0000 (10:49 +0000)]
The argv length calculation was not only off by one, but failed to take
into account the extra space required by expanded quotes, backslashes and
newlines.  Instead of pre-allocating a (possibly too short) buffer, start
with a 64-byte buffer and double it every time we come close to filling
it up.  Also, avoid appending a trailing space before the final newline.

This issue was uncovered by Kristoffer Gleditsch <kristoffer@linpro.no>,
who also helped test this patch.

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

17 years agoExpand and track recent changes.
des [Wed, 28 Mar 2007 09:26:18 +0000 (09:26 +0000)]
Expand and track recent changes.

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

17 years agoActual default max is 1000, not infinity.
des [Wed, 28 Mar 2007 08:11:27 +0000 (08:11 +0000)]
Actual default max is 1000, not infinity.

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

17 years agoTwist the compiler logic around a bit.
phk [Sat, 24 Mar 2007 22:09:53 +0000 (22:09 +0000)]
Twist the compiler logic around a bit.

Concatenate all definitions of the method functions into one
instance of the function:

sub vcl_pipe {
foo;
}

sub vcl_pipe {
bar;
}

is now the same as

sub vcl_pipe {
foo;
bar;
}

This avoids all the magic related to the default functions and
hopefully makes the newly introduced "include" facility much more
useful.

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

17 years agoSplit off the parsing from vcc_compile.c into vcc_parse.c
phk [Sat, 24 Mar 2007 21:01:43 +0000 (21:01 +0000)]
Split off the parsing from vcc_compile.c into vcc_parse.c

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

17 years agouse tl-> consistently
phk [Sat, 24 Mar 2007 20:33:40 +0000 (20:33 +0000)]
use tl-> consistently

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

17 years agoImplement a facility for source file modularization in the VCL
phk [Fri, 9 Mar 2007 10:31:29 +0000 (10:31 +0000)]
Implement a facility for source file modularization in the VCL
compiler.  The syntax is:

include "filename" ;

Unlike the C preprocessors #include directive, a VCL include can
appear anywhere in the sourcefile:

if {req.Cookie == include "cookie.vcl" ; || !req.Host } {
}

and have cookie.vcl contain just:

"8435398475983275293759843"

Technically this results in a change to how we account for source
code references in the counter/profile table as well, and as a result
the entire source code of the VCL program is now compiled into the
shared library for easy reference.

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

17 years agoMake Varnish able to accept connections from multiple sockets by
phk [Thu, 8 Mar 2007 10:09:18 +0000 (10:09 +0000)]
Make Varnish able to accept connections from multiple sockets by
specifying a whitespace separated list of addresses to -a (or
param.set listen_address).

I'm not sure about the error handling, for instance, what is the
desirable behaviour if one of multiple sockets fail to open ?

Suggested by: <darryl.dixon@winterhouseconsulting.com>

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

17 years agoAdd missing "volatile" qualifiers on generic tweakers.
phk [Thu, 8 Mar 2007 09:07:21 +0000 (09:07 +0000)]
Add missing "volatile" qualifiers on generic tweakers.

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

17 years agoAdd a bit of garbage collection to yesterdays change: Passed objects need
phk [Wed, 7 Mar 2007 10:38:20 +0000 (10:38 +0000)]
Add a bit of garbage collection to yesterdays change:  Passed objects need
to have their storage properly reclaimed, including the actual content
of a obj.pass=1 cache entry, once we have sent the content to the original
requestor.

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

17 years agoHaving thought long and hard about this, commit what I think is the
phk [Tue, 6 Mar 2007 22:40:06 +0000 (22:40 +0000)]
Having thought long and hard about this, commit what I think is the
new and simpler flow for version2.

Pass is now handled like a miss where the object will not be cached.

The main result of this is that we drag the entire object, header
and body, from the backend before transmitting it to the client,
thus isolating the backend from slow clients.

From a software engineering point of view it is a big improvement,
because it eliminates the need for all of cache_pass.c and we therefore
end up with less HTTP protocol implementations.

A side effect of this is that ticket #56 should be fixed now.

If the object is pass'ed before vcl_fetch{} that is, in vcl_recv{},
vcl_hit{} or vcl_miss{}, no "pass this" object is inserted in the
cache.  The confusion between "pass", "insert" and "insert_pass"
has been cleaned up, by the removal of the latter.

Pipe and Pass calls vcl_pipe{} and vcl_pass{} respectively, before
contacting the backend.  I havn't quite decided if they should
operate on the request header from the client or the one to the
backend, or both.

One possible use is to inject a "Connection: close" header to limit
pipe to one transaction.

A new vcl_hash{} has been added, it will allow customization of
which fields we hash on, instead of the default "url + Host:" but
this is not yet implemented.

vcl_fetch{} is now called after both the headers and body have been
picked up from the backend.  This will allow us to do more comprehensive
handling of backend errors later on.

A disadvantage to this is that if the object ends up as a "pass
this" object in the cache, we could possibly have released any
queued requests already after the headers were received.  If this
is transpires as a real-world problem, we can add a vcl_fetchhdr{}
which can do an early release (ie: "pass").

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

17 years agoPostremove for debian
bahner [Tue, 27 Feb 2007 19:54:05 +0000 (19:54 +0000)]
Postremove for debian

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

17 years agonumeric value for VARNISH_MAX_WORKER_THREADS
bahner [Tue, 27 Feb 2007 19:32:19 +0000 (19:32 +0000)]
numeric value for VARNISH_MAX_WORKER_THREADS

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

17 years agoInclude Debian and RedHat package metadata in the tarball. This makes life
des [Fri, 23 Feb 2007 10:12:29 +0000 (10:12 +0000)]
Include Debian and RedHat package metadata in the tarball.  This makes life
a lot easier for our packagers.

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

17 years agoConsistently use UTF-8 for non-ASCII characters.
des [Fri, 23 Feb 2007 10:06:53 +0000 (10:06 +0000)]
Consistently use UTF-8 for non-ASCII characters.

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

17 years agoDoh! Fix more -w lossage.
des [Tue, 20 Feb 2007 13:22:33 +0000 (13:22 +0000)]
Doh!  Fix more -w lossage.

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

17 years agoCorrect misunderstanding regarding -w.
des [Tue, 20 Feb 2007 08:46:24 +0000 (08:46 +0000)]
Correct misunderstanding regarding -w.

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

17 years agoUpdated regression test framework so that it runs "test1" sample code.
knutroy [Fri, 16 Feb 2007 13:26:52 +0000 (13:26 +0000)]
Updated regression test framework so that it runs "test1" sample code.
See TODO-file for a (non-exhaustive) list of what remains to be done.

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

17 years agoUpdated regression test framework, but more work is still needed.
knutroy [Tue, 6 Feb 2007 21:55:03 +0000 (21:55 +0000)]
Updated regression test framework, but more work is still needed.

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

17 years agoForgotten commit:
phk [Tue, 30 Jan 2007 12:17:58 +0000 (12:17 +0000)]
Forgotten commit:

Update backend stats fields

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

17 years agoThings you didn't know about C, #7212:
phk [Mon, 29 Jan 2007 22:06:33 +0000 (22:06 +0000)]
Things you didn't know about C, #7212:

There is no sane way to get sscanf to tell you how many characters
were consumed, if you want to allow a variable number of arguments.

The special format %n is patently useless for this, because you
have to insert it at every conceiveable point in the string and
that presumes full explicit whitespace markup.

Parse -w argument "by hand", to catch illegal input like "1,INF,15"

Tripped over by:        Stein Ove Rosseland <steinove@vg.no>

Fixes: ticket #82
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1239 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoExpend a lock on keeping the backend statistics consistent.
phk [Mon, 22 Jan 2007 13:24:42 +0000 (13:24 +0000)]
Expend a lock on keeping the backend statistics consistent.
Rename the fields to make more sense

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

17 years agoThe getaddrinfo(3) API does not tell us the TTL value learned from DNS
phk [Mon, 22 Jan 2007 12:31:52 +0000 (12:31 +0000)]
The getaddrinfo(3) API does not tell us the TTL value learned from DNS
so we have to add our own stuff for that.

Without some kind of TTL, we would hit the DNS server once per failed
attempt to connect to the backend.

If the backend were down, we could hit it a LOT.

In the VCL code:

backend foobar {
[...]
set backend.dnsttl = 20s;
}

will assign a TTL for DNS lookups of this backends hostname+port
combination, we will not hit the DNS server more often that this.

The default is set at 30 seconds, short enough to make things are
workable in a load-balancing-via-DNS setups, yet long enough to not
pound the DNS server flat in case of backend failures.

NOTE that as long as we succeed in connecting to the backend we
do not perform new DNS lookups.  That will have to be revisited
along with possible load-balancing schemes for the backend(s).

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

17 years agoUse struct assignment to overcome volatile poisoning.
phk [Mon, 22 Jan 2007 11:46:25 +0000 (11:46 +0000)]
Use struct assignment to overcome volatile poisoning.

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

17 years agoCache the workspace size from params so it doesn't change under us.
phk [Mon, 22 Jan 2007 11:15:57 +0000 (11:15 +0000)]
Cache the workspace size from params so it doesn't change under us.

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

17 years agoMake params volatile so changes are discovered.
phk [Mon, 22 Jan 2007 11:15:27 +0000 (11:15 +0000)]
Make params volatile so changes are discovered.

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

17 years agoAllow automake version 1.10
phk [Mon, 22 Jan 2007 08:43:30 +0000 (08:43 +0000)]
Allow automake version 1.10

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

17 years agoUnfinished regression test framework which knutroy is taking over from me.
des [Wed, 10 Jan 2007 13:13:50 +0000 (13:13 +0000)]
Unfinished regression test framework which knutroy is taking over from me.

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

17 years agoPolish as result of flexelint run and record a couple of thoughts.
phk [Tue, 2 Jan 2007 13:41:08 +0000 (13:41 +0000)]
Polish as result of flexelint run and record a couple of thoughts.

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

17 years agoFixed double declaraction error on systems having both HAVE_SYS_STATVFS_H and HAVE_SY...
knutroy [Mon, 18 Dec 2006 15:58:59 +0000 (15:58 +0000)]
Fixed double declaraction error on systems having both HAVE_SYS_STATVFS_H and HAVE_SYS_VFS_H.

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

17 years agoBetter workaround for FreeBSD autotools brokenness.
des [Tue, 5 Dec 2006 11:42:39 +0000 (11:42 +0000)]
Better workaround for FreeBSD autotools brokenness.

Pointy hat to: {ade,portsmgr}@freebsd.org

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

17 years agoMake the statfs(3)/statvfs(3) dictomy actually work.
phk [Tue, 5 Dec 2006 09:41:16 +0000 (09:41 +0000)]
Make the statfs(3)/statvfs(3) dictomy actually work.

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

17 years agoAdd a FreeBSD workaround while des@ tries to get autocrap to DTRT under
phk [Tue, 5 Dec 2006 08:48:27 +0000 (08:48 +0000)]
Add a FreeBSD workaround while des@ tries to get autocrap to DTRT under
FreeBSD also.

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

17 years agoNetBSD Portability fix:
phk [Tue, 5 Dec 2006 08:47:43 +0000 (08:47 +0000)]
NetBSD Portability fix:

Starting with 3.1, NetBSD uses statvfs and not statfs.

Submitted by: Juan RP <juan@xtrarom.org>

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

17 years agoRemoved the usage of -w in the initscript until that bug is fixed in varnishd
ingvar [Wed, 8 Nov 2006 09:03:40 +0000 (09:03 +0000)]
Removed the usage of -w in the initscript until that bug is fixed in varnishd

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

17 years agoRewrite tackle_warg(): don't override the default max or timeout unless
des [Wed, 8 Nov 2006 08:59:20 +0000 (08:59 +0000)]
Rewrite tackle_warg(): don't override the default max or timeout unless
the user asks; bail if max < min; fix usage string.

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

17 years agoRemove printf() from signal handler.
des [Wed, 8 Nov 2006 08:49:57 +0000 (08:49 +0000)]
Remove printf() from signal handler.
Make the pipe-juggling code slightly more readable.

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

17 years agoAdding lintian-overrides for debian acceptance
bahner [Fri, 3 Nov 2006 09:37:47 +0000 (09:37 +0000)]
Adding lintian-overrides for debian acceptance

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

17 years agoAs per ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change,
des [Thu, 2 Nov 2006 12:57:11 +0000 (12:57 +0000)]
As per ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change,
remove the so-called advertising clause from these files' license,
making it compatible with the Debian Free Software Guidelines.  As
these files were obtained from FreeBSD, this change was discussed
with and approved by the FreeBSD core team.

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

17 years agoLintian overrides for debian-acceptance
bahner [Mon, 23 Oct 2006 12:21:17 +0000 (12:21 +0000)]
Lintian overrides for debian-acceptance

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

17 years agoPreliminary LSB compliance in init-scripts
bahner [Mon, 23 Oct 2006 12:12:07 +0000 (12:12 +0000)]
Preliminary LSB compliance in init-scripts

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

17 years agoBumped version to 1.0.2 proper
bahner [Thu, 19 Oct 2006 13:55:12 +0000 (13:55 +0000)]
Bumped version to 1.0.2 proper
Added wording regarding the origination of the source of
varnish with relation to debian.

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

17 years agoReverted accidental reversion of dependencies
bahner [Thu, 19 Oct 2006 13:44:27 +0000 (13:44 +0000)]
Reverted accidental reversion of dependencies

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

17 years agoAdded a vendor tag to the rpm package.
ingvar [Thu, 19 Oct 2006 12:55:20 +0000 (12:55 +0000)]
Added a vendor tag to the rpm package.

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

17 years agoAdded build scripts for Red Hat rpm package
ingvar [Thu, 19 Oct 2006 12:43:29 +0000 (12:43 +0000)]
Added build scripts for Red Hat rpm package

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

17 years agoCapitalize.
des [Thu, 19 Oct 2006 09:19:28 +0000 (09:19 +0000)]
Capitalize.

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

17 years agoAdditional commentary
des [Thu, 19 Oct 2006 09:16:42 +0000 (09:16 +0000)]
Additional commentary

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

17 years agoAdd sample VCL config.
des [Thu, 19 Oct 2006 09:16:03 +0000 (09:16 +0000)]
Add sample VCL config.

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

17 years agoAdditional details about global variables.
des [Tue, 17 Oct 2006 12:44:48 +0000 (12:44 +0000)]
Additional details about global variables.

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

17 years agoChange debian/copyright to refer to Subversion
bahner [Fri, 13 Oct 2006 08:04:07 +0000 (08:04 +0000)]
Change debian/copyright to refer to Subversion

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

17 years agoChanged storage location of backend storage to be FHS 2.3 compliant
bahner [Fri, 13 Oct 2006 07:59:54 +0000 (07:59 +0000)]
Changed storage location of backend storage to be FHS 2.3 compliant

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