]> err.no Git - varnish/log
varnish
16 years agoNB: some of this commit sneaked into #2757
phk [Sat, 21 Jun 2008 18:55:13 +0000 (18:55 +0000)]
NB: some of this commit sneaked into #2757

Fix http_GetHdrField() to use the correct RFC2616 syntax for tokens
and separators.

Fixes ticket #255.

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

16 years agoAdd vct_issepctl()
phk [Sat, 21 Jun 2008 18:51:29 +0000 (18:51 +0000)]
Add vct_issepctl()

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

16 years agoCollapse the upper/lower alpha class until we need them separate.
phk [Sat, 21 Jun 2008 18:37:48 +0000 (18:37 +0000)]
Collapse the upper/lower alpha class until we need them separate.
Add "separator" class.

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

16 years agoGo back to 1 pool by default, there is a startup problem if you only
phk [Sat, 21 Jun 2008 17:18:15 +0000 (17:18 +0000)]
Go back to 1 pool by default, there is a startup problem if you only
get a single request.

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

16 years agoAssert that deadlines are not NAN
phk [Sat, 21 Jun 2008 08:39:14 +0000 (08:39 +0000)]
Assert that deadlines are not NAN

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

16 years agoFix the default thread pool parameters to 2 pools, 500 threads and 300 seconds.
phk [Sat, 21 Jun 2008 07:48:02 +0000 (07:48 +0000)]
Fix the default thread pool parameters to 2 pools, 500 threads and 300 seconds.

Add usage for -u while here.

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

16 years agoUse subtraction rather than digittoint since digittoint does not exist on non-BSDs
tfheen [Sat, 21 Jun 2008 06:42:34 +0000 (06:42 +0000)]
Use subtraction rather than digittoint since digittoint does not exist on non-BSDs

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

16 years agoGive BAN_Add() an (option) cli argument so errors can be reported
phk [Fri, 20 Jun 2008 21:33:21 +0000 (21:33 +0000)]
Give BAN_Add() an (option) cli argument so errors can be reported
but also give it a return value since we don't have a cli in VCL.

However, I'm not sure how we will report the error in VCL, so still
log the trouble in shmlog.

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

16 years agoRename AddBan() to BAN_Add() for consistency.
phk [Fri, 20 Jun 2008 21:16:22 +0000 (21:16 +0000)]
Rename AddBan() to BAN_Add() for consistency.

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

16 years agoSpell "content-length" correctly.
phk [Fri, 20 Jun 2008 15:49:10 +0000 (15:49 +0000)]
Spell "content-length" correctly.

Add regresion test for ticket 102

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

16 years agoAdd a TCP reuse testcase, and polish the a00006 case a bit
phk [Fri, 20 Jun 2008 15:34:14 +0000 (15:34 +0000)]
Add a TCP reuse testcase, and polish the a00006 case a bit

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

16 years agoMore support for message bodies
phk [Fri, 20 Jun 2008 15:26:02 +0000 (15:26 +0000)]
More support for message bodies

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

16 years agoMention that strings use %xx escapes in VCL.
phk [Fri, 20 Jun 2008 14:51:51 +0000 (14:51 +0000)]
Mention that strings use %xx escapes in VCL.

Closes 252

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

16 years agoAdd a boolean paramter "log_local_address" which enables logging of
phk [Fri, 20 Jun 2008 14:47:50 +0000 (14:47 +0000)]
Add a boolean paramter "log_local_address" which enables logging of
the local socket address in the SessionOpen records in SHM.

This costs us an extra getsockname(2) call per connection, so default
to off.

SHM clients can tell the state of this option by the number of fields
in SessionOpen: 3 (off) or 4 (on).

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

16 years agoAdd a param "log_hashstring" that controls logging of the completed
phk [Fri, 20 Jun 2008 13:08:52 +0000 (13:08 +0000)]
Add a param "log_hashstring" that controls logging of the completed
hash string in SHM log under the "Hash" tag.

Enabling this increases pressure on the SHM log considerably, so don't
enable it, unless you need it.

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

16 years agoMake regsub() return an empty string if it gets no input.
phk [Fri, 20 Jun 2008 12:43:45 +0000 (12:43 +0000)]
Make regsub() return an empty string if it gets no input.

Fixes ticket 251 (regression test added)

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

16 years agoforgot to svn add this one: logging functions for varnishtest
phk [Fri, 20 Jun 2008 12:25:25 +0000 (12:25 +0000)]
forgot to svn add this one: logging functions for varnishtest

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

16 years agoNB: FLAGDAY!
phk [Fri, 20 Jun 2008 11:58:25 +0000 (11:58 +0000)]
NB: FLAGDAY!

Make an executive decision, and change the regsub() replacement specifiers to
get something which is consistent and nontroubling for URL and query strings.

Since $ and & both are heavily used in query strings, we (DES & I)
have chosen to use \0 ... \9 for replacement indicators, with \0
being the "all matched text" replacement and \1...\9 replacing
with tne N'th paranthesized subexpressions.

   regsub("_barf_", "(b)(a)(r)(f)", "\0\4\3\2\\p") -> "_barffra\p_"

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

16 years agoAdd regsub test case so I don't break it again.
phk [Fri, 20 Jun 2008 10:20:30 +0000 (10:20 +0000)]
Add regsub test case so I don't break it again.

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

16 years agoFix a number of issues and bugs with regsub():
phk [Fri, 20 Jun 2008 10:20:12 +0000 (10:20 +0000)]
Fix a number of issues and bugs with regsub():

Allow '\' to escape the next char.

Make '$$' be the same as '&': entire match
XXX: NB: Should we drop the sed(1) usage of '&' here, it means
XXX: a lot of backslashing in query string urls ?

Make $-digit work correctly.

Fixes ticket 249

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

16 years agoAdd a hand function to safely add text to a txt
phk [Fri, 20 Jun 2008 10:15:56 +0000 (10:15 +0000)]
Add a hand function to safely add text to a txt

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

16 years agoUse default_grace consistently or it will all be in vain.
phk [Fri, 20 Jun 2008 07:32:38 +0000 (07:32 +0000)]
Use default_grace consistently or it will all be in vain.

Submitted by: sky
Fixes: ticket 253

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

16 years agoRework the output of messages and add -q and -v options.
phk [Fri, 20 Jun 2008 06:56:03 +0000 (06:56 +0000)]
Rework the output of messages and add -q and -v options.

This allows us to use buffered approaches later, if the file descritor
lock stats to interfere with our concurrency.

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

16 years agoExpect X-Varnish to show the correct XIDs
phk [Tue, 17 Jun 2008 20:52:20 +0000 (20:52 +0000)]
Expect X-Varnish to show the correct XIDs

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

16 years agoAdd -cli command.
phk [Tue, 17 Jun 2008 20:52:00 +0000 (20:52 +0000)]
Add -cli command.

Always reset XID to 1000 on start.

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

16 years agoAdd a debug.xid CLI command to the child process that allows us to
phk [Tue, 17 Jun 2008 20:46:29 +0000 (20:46 +0000)]
Add a debug.xid CLI command to the child process that allows us to
inspect and change the XID counter.

This will allow varnishtester to test XID headers for correct behaviour.

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

16 years agoA couple more basic tests: pass and cache hit
phk [Tue, 17 Jun 2008 20:35:45 +0000 (20:35 +0000)]
A couple more basic tests: pass and cache hit

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

16 years agoAutomatically wait for servers and clients during reset pass.
phk [Tue, 17 Jun 2008 20:27:31 +0000 (20:27 +0000)]
Automatically wait for servers and clients during reset pass.

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

16 years agoAdd a trivial pipe test
phk [Tue, 17 Jun 2008 10:20:29 +0000 (10:20 +0000)]
Add a trivial pipe test

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

16 years agoLaunch varnish on -vcl or -vcl+backend if not already done.
phk [Tue, 17 Jun 2008 10:19:33 +0000 (10:19 +0000)]
Launch varnish on -vcl or -vcl+backend if not already done.

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

16 years agoDon't say we're done until after we have reset everything.
phk [Tue, 17 Jun 2008 10:19:13 +0000 (10:19 +0000)]
Don't say we're done until after we have reset everything.

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

16 years agoNow that varnishd's -d -d mode behaves correctly, use a more
phk [Tue, 17 Jun 2008 10:15:20 +0000 (10:15 +0000)]
Now that varnishd's -d -d mode behaves correctly, use a more
civilized shutdown sequence.

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

16 years agoDon't assert that the close succeeds, we may already have closed the telnet
phk [Tue, 17 Jun 2008 10:14:23 +0000 (10:14 +0000)]
Don't assert that the close succeeds, we may already have closed the telnet
socket.

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

16 years agoWhen running in -d -d mode, close all telnet sockets when stdin closes.
phk [Tue, 17 Jun 2008 10:13:03 +0000 (10:13 +0000)]
When running in -d -d mode, close all telnet sockets when stdin closes.

... But do not do this for the single -d mode.

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

16 years agoFix another corner case in teardown of the event manager.
phk [Tue, 17 Jun 2008 10:11:44 +0000 (10:11 +0000)]
Fix another corner case in teardown of the event manager.

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

16 years agoFix broken logic in the poll-fd compaction function, which resulted in
phk [Tue, 17 Jun 2008 09:37:44 +0000 (09:37 +0000)]
Fix broken logic in the poll-fd compaction function, which resulted in
a panic during this sequence:

varnishd -d -d -T :8082
ctrl-D
telnet localhost 8082 (from other terminal)

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

16 years agoHack up a crude debugging facility for the event manager.
phk [Tue, 17 Jun 2008 09:21:58 +0000 (09:21 +0000)]
Hack up a crude debugging facility for the event manager.

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

16 years agoUse POLLIN instead of POLLRDNORM
phk [Tue, 17 Jun 2008 08:57:46 +0000 (08:57 +0000)]
Use POLLIN instead of POLLRDNORM

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

16 years agoAssert that the event manager found something for each pending fd.
phk [Tue, 17 Jun 2008 08:18:42 +0000 (08:18 +0000)]
Assert that the event manager found something for each pending fd.

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

16 years agoAdd varnish -wait and make varnish -stop mean the logical thing
phk [Tue, 17 Jun 2008 08:03:58 +0000 (08:03 +0000)]
Add varnish -wait and make varnish -stop mean the logical thing

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

16 years agoAdd a -vcl+backend argument to the varnish command which autogenerates
phk [Tue, 17 Jun 2008 07:53:21 +0000 (07:53 +0000)]
Add a -vcl+backend argument to the varnish command which autogenerates
backend stanzas for the servers we know about.

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

16 years agoUse vsb_newauto() macro throughout
phk [Tue, 17 Jun 2008 07:37:27 +0000 (07:37 +0000)]
Use vsb_newauto() macro throughout

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

16 years agoallow delays in http procssing (client & server)
phk [Tue, 17 Jun 2008 07:32:43 +0000 (07:32 +0000)]
allow delays in http procssing (client & server)

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

16 years agoAdd -vcl option varnish command, to load inline VCL code.
phk [Tue, 17 Jun 2008 07:30:16 +0000 (07:30 +0000)]
Add -vcl option varnish command, to load inline VCL code.

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

16 years agoAdd a vsb_newauto() macro
phk [Tue, 17 Jun 2008 07:24:20 +0000 (07:24 +0000)]
Add a vsb_newauto() macro

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

16 years agoAdd a delay command, it takes second.fraction and uses usleep()
phk [Tue, 17 Jun 2008 07:10:14 +0000 (07:10 +0000)]
Add a delay command, it takes second.fraction and uses usleep()
below 100s and sleep() over.

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

16 years agoWe don't want a separate vcl command, it will be a subcommand of the
phk [Tue, 17 Jun 2008 07:04:03 +0000 (07:04 +0000)]
We don't want a separate vcl command, it will be a subcommand of the
varnish command.

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

16 years agoremove redundant -repeat 1
phk [Mon, 16 Jun 2008 22:31:27 +0000 (22:31 +0000)]
remove redundant -repeat 1

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

16 years agoAdd the first test-case that involves a varnish process
phk [Mon, 16 Jun 2008 22:16:40 +0000 (22:16 +0000)]
Add the first test-case that involves a varnish process

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

16 years agoUse 9081 as default server address
phk [Mon, 16 Jun 2008 22:15:27 +0000 (22:15 +0000)]
Use 9081 as default server address

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

16 years agoAdd CLI asking function.
phk [Mon, 16 Jun 2008 22:14:56 +0000 (22:14 +0000)]
Add CLI asking function.
Get pipe magic right.
Add brutal stop function.

See the first test transaction get through.

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

16 years agoShow servers listen address.
phk [Mon, 16 Jun 2008 22:13:52 +0000 (22:13 +0000)]
Show servers listen address.

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

16 years agoMake sure backend connections are blocking before we need them to be.
phk [Mon, 16 Jun 2008 22:10:52 +0000 (22:10 +0000)]
Make sure backend connections are blocking before we need them to be.

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

16 years agoMove cli_func_ping() prototype where it belongs.
phk [Mon, 16 Jun 2008 21:58:57 +0000 (21:58 +0000)]
Move cli_func_ping() prototype where it belongs.

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

16 years agoAdd code to launch a varnish instance and open a CLI connection to it
phk [Mon, 16 Jun 2008 21:28:18 +0000 (21:28 +0000)]
Add code to launch a varnish instance and open a CLI connection to it
via TELNET.

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

16 years agoUse VSS_open()
phk [Mon, 16 Jun 2008 21:27:26 +0000 (21:27 +0000)]
Use VSS_open()

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

16 years agoAdd VSS_open(const char *str) for when you just want a connection and
phk [Mon, 16 Jun 2008 21:25:36 +0000 (21:25 +0000)]
Add VSS_open(const char *str) for when you just want a connection and
don't really care about addresses and all that.

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

16 years agoEnforce server and client name initials as 's' and 'c' respectively.
phk [Mon, 16 Jun 2008 07:10:47 +0000 (07:10 +0000)]
Enforce server and client name initials as 's' and 'c' respectively.

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

16 years agoAllow varnishd to be started with neither -b nor -f, this is useful
phk [Sun, 15 Jun 2008 21:25:41 +0000 (21:25 +0000)]
Allow varnishd to be started with neither -b nor -f, this is useful
where a central facility is used to push VCL's to a number of Varnish
hosts.

Until a VCL is loaded, the child process cannot be started.

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

16 years agoAdd a Reset pass after each testfile
phk [Sun, 15 Jun 2008 21:11:19 +0000 (21:11 +0000)]
Add a Reset pass after each testfile

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

16 years agoAdd -start and -wait for clients for async execution
phk [Sun, 15 Jun 2008 20:57:30 +0000 (20:57 +0000)]
Add -start and -wait for clients for async execution

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

16 years agoMore test-cases
phk [Sun, 15 Jun 2008 20:57:08 +0000 (20:57 +0000)]
More test-cases

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

16 years agoDescribe tests with test keyword
phk [Sun, 15 Jun 2008 20:50:24 +0000 (20:50 +0000)]
Describe tests with test keyword

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

16 years agoAdd "test" keyword for printing a test description
phk [Sun, 15 Jun 2008 20:49:27 +0000 (20:49 +0000)]
Add "test" keyword for printing a test description

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

16 years agoNo longer relevant
phk [Sun, 15 Jun 2008 20:41:35 +0000 (20:41 +0000)]
No longer relevant

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

16 years agoTwo first testcases
phk [Sun, 15 Jun 2008 20:41:04 +0000 (20:41 +0000)]
Two first testcases

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

16 years agoPolishing
phk [Sun, 15 Jun 2008 20:37:52 +0000 (20:37 +0000)]
Polishing

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

16 years agoWrap two level 1 messages around each test file.
phk [Sun, 15 Jun 2008 19:55:49 +0000 (19:55 +0000)]
Wrap two level 1 messages around each test file.

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

16 years agoFlexelint
phk [Sun, 15 Jun 2008 19:53:36 +0000 (19:53 +0000)]
Flexelint

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

16 years agoMake the HTTP expect work for trivial cases.
phk [Sun, 15 Jun 2008 19:52:34 +0000 (19:52 +0000)]
Make the HTTP expect work for trivial cases.

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

16 years agoRegularize a couple of messages.
phk [Sun, 15 Jun 2008 19:32:02 +0000 (19:32 +0000)]
Regularize a couple of messages.

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

16 years agoGet a fair bit further in parsing HTTP stuff.
phk [Sun, 15 Jun 2008 16:11:17 +0000 (16:11 +0000)]
Get a fair bit further in parsing HTTP stuff.

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

16 years agoOn further consideration: give VCT it's own header file.
phk [Sun, 15 Jun 2008 15:43:21 +0000 (15:43 +0000)]
On further consideration: give VCT it's own header file.

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

16 years agoPolish VCT a bit more.
phk [Sun, 15 Jun 2008 15:40:39 +0000 (15:40 +0000)]
Polish VCT a bit more.

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

16 years agoAdd VCT: a RFC2616 ctype
phk [Sun, 15 Jun 2008 15:30:49 +0000 (15:30 +0000)]
Add VCT: a RFC2616 ctype

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

16 years agoFlexeLint varnishtest
phk [Sun, 15 Jun 2008 13:36:50 +0000 (13:36 +0000)]
FlexeLint varnishtest

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

16 years agoAdd http txresponse
phk [Sun, 15 Jun 2008 13:16:18 +0000 (13:16 +0000)]
Add http txresponse

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

16 years agoFunction to receive a HTTP header, as request or response.
phk [Sun, 15 Jun 2008 13:09:21 +0000 (13:09 +0000)]
Function to receive a HTTP header, as request or response.

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

16 years agoImplement http::txreq
phk [Sun, 15 Jun 2008 12:45:53 +0000 (12:45 +0000)]
Implement http::txreq

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

16 years agoImplement backslash-newline escapes.
phk [Sun, 15 Jun 2008 12:44:10 +0000 (12:44 +0000)]
Implement backslash-newline escapes.

Implement "" quoting of strings.

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

16 years agoPropset svn:keywords and add $Id
phk [Sun, 15 Jun 2008 12:15:47 +0000 (12:15 +0000)]
Propset svn:keywords and add $Id

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

16 years agoAdd $Id$
phk [Sun, 15 Jun 2008 12:13:24 +0000 (12:13 +0000)]
Add $Id$

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

16 years agoAdd the HTTP subprocessor
phk [Sun, 15 Jun 2008 12:08:11 +0000 (12:08 +0000)]
Add the HTTP subprocessor

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

16 years agoHash out the client, up to and including connection to the server.
phk [Sun, 15 Jun 2008 11:47:01 +0000 (11:47 +0000)]
Hash out the client, up to and including connection to the server.

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

16 years agoDefault server to repeat=1.
phk [Sun, 15 Jun 2008 11:30:13 +0000 (11:30 +0000)]
Default server to repeat=1.

Accept connections, and close them right away.

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

16 years agoMake the first testcase a test of the testprogram
phk [Sun, 15 Jun 2008 11:22:55 +0000 (11:22 +0000)]
Make the first testcase a test of the testprogram

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

16 years agoServer socket & thread creation
phk [Sun, 15 Jun 2008 11:17:45 +0000 (11:17 +0000)]
Server socket & thread creation

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

16 years agoput varnishtest under auto* control
phk [Sun, 15 Jun 2008 10:50:15 +0000 (10:50 +0000)]
put varnishtest under auto* control

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

16 years agoRemove BSD style makefile
phk [Sun, 15 Jun 2008 10:49:11 +0000 (10:49 +0000)]
Remove BSD style makefile

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

16 years agoAdd LICENSE
phk [Sun, 15 Jun 2008 10:00:33 +0000 (10:00 +0000)]
Add LICENSE

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

16 years agoHash out more files and cmd functions
phk [Sun, 15 Jun 2008 09:57:28 +0000 (09:57 +0000)]
Hash out more files and cmd functions

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

16 years agoAdd Skelton "varnishtest" program.
phk [Sun, 15 Jun 2008 09:50:13 +0000 (09:50 +0000)]
Add Skelton "varnishtest" program.

This is a test-driver which will be able to drive low-level tests of
varnish functionalty.

The present code manages to parse the example testcase description,
more work to follow.

XXX: needs to be auto*'ed, right now it uses FreeBSD makefile syntax.

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

16 years agoChange defaults:
phk [Sat, 14 Jun 2008 14:26:59 +0000 (14:26 +0000)]
Change defaults:

Make Grace mode the default with 10 seconds (param: default_grace)

Make the thread idle timeout 300 seconds (param: thread_pool_timeout)

Max one new thread per 20 msec (param: thread_pool_add_delay)

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

16 years agoSlightly change the criteria for starting new worker threads: Don't
phk [Sat, 14 Jun 2008 14:14:28 +0000 (14:14 +0000)]
Slightly change the criteria for starting new worker threads:  Don't
do it if the number of queued threads dropped since last inspection.

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

16 years agoAdd an optional shortcut:
phk [Wed, 11 Jun 2008 21:12:26 +0000 (21:12 +0000)]
Add an optional shortcut:

The parameter session_linger determines how many milliseconds the
workerthread waits to see if another request has arrived, before
handing the session over to the session herder.

If we manage to catch the next request this way, we save a number
of semi-expensive steps, if we hang around too long, the worker-thread
gets to goof off.

A relatively small sample of data from a live server, indicates
that 20% of all requests arrive within 50 msec of the previous
request and 50% within 100msec.

It is not clear at present how these timeintervals relate to client
RTT, or if they are systematically too high, due to the duration
of the detour over the herder.

There is a new line in varnishstat keeping track of how many times
this gamble succeeds.

Experimentation is encouraged.

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

16 years agoBe a little less hysteric with charging session statistics to
phk [Wed, 11 Jun 2008 20:50:55 +0000 (20:50 +0000)]
Be a little less hysteric with charging session statistics to
srcaddr and global counters.

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

16 years agoRefactor the fields of struct acct so we don't have to remember them three
phk [Tue, 10 Jun 2008 14:37:14 +0000 (14:37 +0000)]
Refactor the fields of struct acct so we don't have to remember them three
different places in the code.

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

16 years agoMake this compile under OS/X 10.5 Leopard
phk [Tue, 10 Jun 2008 13:29:08 +0000 (13:29 +0000)]
Make this compile under OS/X 10.5 Leopard

Submitted by: peter
Closes: 245
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2660 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoSlight backtracking: Store the specified socket name in the listen socket
phk [Mon, 9 Jun 2008 13:35:35 +0000 (13:35 +0000)]
Slight backtracking:  Store the specified socket name in the listen socket
structure, instead of whatever we actually bound to.  It is more informative
and intuitive.

Report the listen socket spec in the SessionOpen shm record.

Close listen sockets as soon as we have forked the child, this eliminated
a fd-leak when a socket was eliminated from listen_address while the child
ran.

Fix various potential problems related to not being able to bind to one
or more listen addresses.

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

16 years agoDon't leak listen address structures if we fail to bind to them.
phk [Mon, 9 Jun 2008 13:11:45 +0000 (13:11 +0000)]
Don't leak listen address structures if we fail to bind to them.

Associate ascii representation addr/port strings with each listen
socket, already in the manager process.

Postpone listen(2) call until client is ready, to limit initial
connection spike.

XXX: I still miss an unlisten(2).

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