]> err.no Git - varnish/log
varnish
17 years agoIsolate the C-compiler even more with env -i and -nostdinc
phk [Mon, 20 Aug 2007 08:58:24 +0000 (08:58 +0000)]
Isolate the C-compiler even more with env -i and -nostdinc

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

17 years agoUse uppercase VBE prefix for VBE_new_bereq() and VBE_free_bereq()
phk [Mon, 20 Aug 2007 08:57:42 +0000 (08:57 +0000)]
Use uppercase VBE prefix for VBE_new_bereq() and VBE_free_bereq()

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

17 years agoComment on postinst user-creation
bahner [Mon, 20 Aug 2007 08:56:40 +0000 (08:56 +0000)]
Comment on postinst user-creation

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

17 years agoAdded creation of varnish user and group to postinst
bahner [Mon, 20 Aug 2007 08:55:34 +0000 (08:55 +0000)]
Added creation of varnish user and group to postinst

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

17 years agoAssert that the timestats we need for VSL_StatSess are valid.
phk [Mon, 20 Aug 2007 08:55:13 +0000 (08:55 +0000)]
Assert that the timestats we need for VSL_StatSess are valid.

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

17 years agoAdded -u and -g to default setup. Bumped release.
bahner [Mon, 20 Aug 2007 08:38:29 +0000 (08:38 +0000)]
Added -u and -g to default setup. Bumped release.

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

17 years agoChange the way the result from a command is reported. Instead of separate
des [Mon, 20 Aug 2007 07:56:25 +0000 (07:56 +0000)]
Change the way the result from a command is reported.  Instead of separate
ev_varnish_command_ok and ev_varnish_command_unknown events, we now emit
a single ev_varnish_result event accompanied by the result code and text.
Furthermore, Varnish::Test::Varnish::send_command() will now wait for this
event and return the code and text.

Note that this reintroduces a race between ev_varnish_child_stopped and
ev_varnish_result; this will be dealt with in a later commit.

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

17 years agoAdd more asserts to try to find a cure for #150.
phk [Mon, 20 Aug 2007 07:35:10 +0000 (07:35 +0000)]
Add more asserts to try to find a cure for #150.

Don't nuke t_end timestamp, we need it for StatSess logentry.

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

17 years agoUse a TCP connection for management commands, rather than std{in,out,err},
des [Mon, 20 Aug 2007 06:57:03 +0000 (06:57 +0000)]
Use a TCP connection for management commands, rather than std{in,out,err},
as the latter is polluted with "Child said" and similar messages.

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

17 years agoReset the cli buffer when we have soaked up all it contained.
phk [Sun, 19 Aug 2007 21:20:48 +0000 (21:20 +0000)]
Reset the cli buffer when we have soaked up all it contained.
Otherwise we will for ever be repeating the same command over and over,
no matter what the input to the cli might be.

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

17 years agoFeed my virtual whitespace habbit.
phk [Sun, 19 Aug 2007 21:19:46 +0000 (21:19 +0000)]
Feed my virtual whitespace habbit.

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

17 years agoWhitespace cleanup.
des [Sun, 19 Aug 2007 18:18:11 +0000 (18:18 +0000)]
Whitespace cleanup.

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

17 years agoRestructure mgt_cli_callback(), and add comments to make it clear what's
des [Sun, 19 Aug 2007 18:12:03 +0000 (18:12 +0000)]
Restructure mgt_cli_callback(), and add comments to make it clear what's
going on.  Also take care of a bug where strchr() was used on a non-NUL-
terminated buffer.  This fixes #134.

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

17 years agoImprove style.
des [Sun, 19 Aug 2007 17:26:45 +0000 (17:26 +0000)]
Improve style.

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

17 years agoWhitespace cleanup
des [Sun, 19 Aug 2007 17:17:58 +0000 (17:17 +0000)]
Whitespace cleanup

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

17 years ago* Use CRLF EOL-markers.
knutroy [Fri, 17 Aug 2007 12:30:58 +0000 (12:30 +0000)]
* Use CRLF EOL-markers.

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

17 years ago* Work-around for VCL-loading issue (apparently a race condition somewhere).
knutroy [Fri, 17 Aug 2007 12:23:45 +0000 (12:23 +0000)]
* Work-around for VCL-loading issue (apparently a race condition somewhere).

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

17 years ago* Added automatic shutdown of Client-objects used by a test.
knutroy [Thu, 16 Aug 2007 13:07:55 +0000 (13:07 +0000)]
* Added automatic shutdown of Client-objects used by a test.
* Added more diagnostic messages wrt. left-over input data/junk.

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

17 years agoShow elapsed time in milliseconds instead of microseconds, and shrink some
des [Wed, 15 Aug 2007 12:27:54 +0000 (12:27 +0000)]
Show elapsed time in milliseconds instead of microseconds, and shrink some
columns to give the test description more space.

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

17 years ago* Added handling of event handlers using die(), by queuing "die"
knutroy [Wed, 15 Aug 2007 08:28:58 +0000 (08:28 +0000)]
* Added handling of event handlers using die(), by queuing "die"
  events.
* Issue warning when IO::Multiplex has been subject to die() which
  where not caught and queued. (This is known to happen e.g. when
  hitting die() in Varnish::Test::Server::Connection::mux_eof(), so a
  more complete, long-term die()-wrapping solution is needed.)

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

17 years ago* Tue Aug 14 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.svn
ingvar [Tue, 14 Aug 2007 21:57:58 +0000 (21:57 +0000)]
* Tue Aug 14 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.svn
- Update for 1.1 branch
- Added the devel package for the header files and static library files
- Added a varnish user, and fixed the init script accordingly

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

17 years agoAdd (as a comment for now) some information on the shared memory log that
des [Mon, 13 Aug 2007 19:39:12 +0000 (19:39 +0000)]
Add (as a comment for now) some information on the shared memory log that
phk jotted down in #44.

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

17 years agoThe syntax has changed.
des [Mon, 13 Aug 2007 18:37:26 +0000 (18:37 +0000)]
The syntax has changed.

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

17 years agoUse assert_xid() in testPassPOST().
des [Mon, 13 Aug 2007 18:37:15 +0000 (18:37 +0000)]
Use assert_xid() in testPassPOST().

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

17 years agoFix assert_xid() and add assert_no_xid() (useful for piped requests)
des [Mon, 13 Aug 2007 18:36:15 +0000 (18:36 +0000)]
Fix assert_xid() and add assert_no_xid() (useful for piped requests)

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

17 years agoDocument what seems to be a bug in the framework.
des [Mon, 13 Aug 2007 18:31:39 +0000 (18:31 +0000)]
Document what seems to be a bug in the framework.

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

17 years agoNot all responses have XIDs.
des [Mon, 13 Aug 2007 18:30:15 +0000 (18:30 +0000)]
Not all responses have XIDs.

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

17 years agoCorrect three bits worth of line noise. This fixes #129.
des [Mon, 13 Aug 2007 18:00:50 +0000 (18:00 +0000)]
Correct three bits worth of line noise.  This fixes #129.

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

17 years agoReadability nit
des [Mon, 13 Aug 2007 17:58:09 +0000 (17:58 +0000)]
Readability nit

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

17 years agoDisable tests which we aren't entirely sure should succeed.
des [Mon, 13 Aug 2007 16:34:26 +0000 (16:34 +0000)]
Disable tests which we aren't entirely sure should succeed.

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

17 years agoUse set_param() to enable VCL tracing
des [Mon, 13 Aug 2007 16:34:06 +0000 (16:34 +0000)]
Use set_param() to enable VCL tracing

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

17 years agoAdd set_param()
des [Mon, 13 Aug 2007 16:33:46 +0000 (16:33 +0000)]
Add set_param()

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

17 years agoTypo in previous commit.
des [Mon, 13 Aug 2007 13:53:10 +0000 (13:53 +0000)]
Typo in previous commit.

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

17 years agoImprove timeout handling, and add a server timeout which starts running when
des [Mon, 13 Aug 2007 13:52:29 +0000 (13:52 +0000)]
Improve timeout handling, and add a server timeout which starts running when
the server gets a partial response.  Similarly, on the client side, cancel
the timeout as soon as we get data, but restart it if we have to wait for
more.  Also stop logging the full content of requests and responses; it
clutters the output and can easily be obtained using varnishlog(1).

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

17 years agoAdded missing dependency on "libc6-dev | libc-dev" for vcl compilation
ssm [Fri, 10 Aug 2007 14:05:32 +0000 (14:05 +0000)]
Added missing dependency on "libc6-dev | libc-dev" for vcl compilation

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

17 years agoDon't call functions outside the VRT namespace, even if this means
phk [Fri, 10 Aug 2007 10:28:08 +0000 (10:28 +0000)]
Don't call functions outside the VRT namespace, even if this means
that we have to wrap strcmp().

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

17 years agoFix an architectural mistake:
phk [Fri, 10 Aug 2007 09:51:16 +0000 (09:51 +0000)]
Fix an architectural mistake:

What the compiled VCL code contains is not "a backend" but more
like a specification of or a template of a backend.

This matters because it controls the ownership of the backend
structure, and to a lesser degree because it complicates the VRT
api with a lot of pointless functions.

When vcl.use switches to a different VCL program, the backends of
the old VCL program may still be in use, and, provided the backend
declarations of the two VCL programs are identical, should continue
be carried over to the new VCL code.

This requires the memory and state to be owned by the central backend
code, and the VCL programs to just hold references and becomes even
more important when we keep complex state for load balancing on
individual backends.

This commit changes the ownership of the backends to the central code,
and moves the specification used in the compiled VCL program to a
communication structure for just that.

This also paves the way for introducing directors/policies for backend
selection and for good measure, I have named the default (ie: current)
backend policy "simple" for now.

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

17 years agoDocument purge_url / purge_hash
des [Fri, 10 Aug 2007 09:36:42 +0000 (09:36 +0000)]
Document purge_url / purge_hash

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

17 years agoRemove the "purge" compat, we never shipped it in a release.
phk [Fri, 10 Aug 2007 09:22:49 +0000 (09:22 +0000)]
Remove the "purge" compat, we never shipped it in a release.

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

17 years agoAvoid mixing statements and declarations (#147)
des [Fri, 10 Aug 2007 07:13:02 +0000 (07:13 +0000)]
Avoid mixing statements and declarations (#147)

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

17 years agoAdd some text about the cli + the munin / nagios / webmin plugins, and some
des [Thu, 9 Aug 2007 17:11:35 +0000 (17:11 +0000)]
Add some text about the cli + the munin / nagios / webmin plugins, and some
greek to help the document validate.

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

17 years agoFormat <command>, <literal> and <varname> in monospace.
des [Thu, 9 Aug 2007 17:04:50 +0000 (17:04 +0000)]
Format <command>, <literal> and <varname> in monospace.

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

17 years agoExplain the meaning of obj.valid and obj.cacheable.
des [Thu, 9 Aug 2007 14:58:56 +0000 (14:58 +0000)]
Explain the meaning of obj.valid and obj.cacheable.

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

17 years agoRename libcompat to libvarnishcompat, and make it dynamic.
des [Thu, 9 Aug 2007 11:19:20 +0000 (11:19 +0000)]
Rename libcompat to libvarnishcompat, and make it dynamic.

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

17 years agoImplement purging on either of hash or url.
phk [Wed, 8 Aug 2007 19:43:51 +0000 (19:43 +0000)]
Implement purging on either of hash or url.

In VCL:
purge_url(<regexp>)
purge_hash(<regexp>)
(for an interrim period purge(<regexp>) will be the same as purge_url).
In CLI
url.purge <regexp>
hash.purge <regexp>

purge_hash operates on the hash-string which results from vcl_hash(),
by default it is composed of:

req.url "#" req.http.host "#"

To purge everything on the virtual host foo.bar.com:

In CLI:
url.purge "#foo.bar.com#$"

In VCL:
purge_hash("#foo.bar.com#$");

The general format, if you have defined vcl_hash(), is:

Each "req.hash +=" operator appends the right hand side of the
+= and a "#" separator.

You'll have to figure out your own regexps.

Under the hood:

Move the hash string from object to objecthead and save space while
we're at it.

Fix indentation in generated source.

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

17 years agoI'm not sure Varnish should GET from the backend when the client used POST
des [Wed, 8 Aug 2007 12:10:17 +0000 (12:10 +0000)]
I'm not sure Varnish should GET from the backend when the client used POST
but the VCL script decided to cache the request anyway.  Treat it as an
error for now.

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

17 years agoStart varnishd with '-n regress'.
des [Wed, 8 Aug 2007 12:08:25 +0000 (12:08 +0000)]
Start varnishd with '-n regress'.
Handle server failures gracefully.

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

17 years agoAdd three regression tests for POST request handling. All of them
des [Wed, 8 Aug 2007 11:00:26 +0000 (11:00 +0000)]
Add three regression tests for POST request handling.  All of them
currently fail (see #47, #129).

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

17 years agoImprove request generation.
des [Wed, 8 Aug 2007 10:58:17 +0000 (10:58 +0000)]
Improve request generation.

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

17 years agoRemove FreeBSD workaround; the FreeBSD ports tree has had working autotools
des [Wed, 8 Aug 2007 10:01:50 +0000 (10:01 +0000)]
Remove FreeBSD workaround; the FreeBSD ports tree has had working autotools
for two weeks now.  Also fix inconsistent indentation.

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

17 years agoElminiate a spurious message when sigchild looses a race to popen(2).
phk [Wed, 8 Aug 2007 08:49:11 +0000 (08:49 +0000)]
Elminiate a spurious message when sigchild looses a race to popen(2).

This fixed #143

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

17 years agoMinimize a race when looking up addresses for backends.
phk [Tue, 7 Aug 2007 10:27:34 +0000 (10:27 +0000)]
Minimize a race when looking up addresses for backends.

The race is not closed however, proper locking needs to be thought out.

An XXX comment documents this for now.

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

17 years agoImplement "error" action in vcl_fetch() and vcl_deliver()
phk [Tue, 7 Aug 2007 07:23:10 +0000 (07:23 +0000)]
Implement "error" action in vcl_fetch() and vcl_deliver()

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

17 years agoWhen vcl_miss() take error action, remember to discard backend request.
phk [Tue, 7 Aug 2007 06:55:52 +0000 (06:55 +0000)]
When vcl_miss() take error action, remember to discard backend request.

Ticket: 139

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

17 years agoForgot an assert.
phk [Mon, 6 Aug 2007 09:28:44 +0000 (09:28 +0000)]
Forgot an assert.

WS_Return() is now unused, comment it out.

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

17 years agoRewrite the req.hash implmentation:
phk [Mon, 6 Aug 2007 09:25:20 +0000 (09:25 +0000)]
Rewrite the req.hash implmentation:

Instead of assembling the entire hash-string in the workspace, use
a scatter gather approach, hinted by the VCL compiler.

This eliminates the workspace reservation which prevented regsub() from
working in vcl_hash, and reduces the size of the necessary workspace a
fair bit as well, at the cost of a little bit of complexity in the
hash implmentations.

Closes ticket 137 and possibly 141

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

17 years agoAdd piecemal crc32 function back, we will need it for the scatter/gather
phk [Mon, 6 Aug 2007 09:19:20 +0000 (09:19 +0000)]
Add piecemal crc32 function back, we will need it for the scatter/gather
hash string.

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

17 years agoHave the VCL compiler provide a hint about the worst case number of
phk [Mon, 6 Aug 2007 08:07:18 +0000 (08:07 +0000)]
Have the VCL compiler provide a hint about the worst case number of
operations on the req.hash variable.

It is only a hint, because it merely counts how many times the parser
saw something being added to the req.hash variable.  If the operation
was in a subroutine which was called multiple times, the hint will not
reflect the number of actual operations.

For now we will deal with that at runtime, at the expense of a
failed transaction every time we run short.  If this becomes an issue,
an extensive topological analysis of the VCL program can give us
a definitive count.

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

17 years agoAdd comment to remind myself.
phk [Sun, 5 Aug 2007 21:06:41 +0000 (21:06 +0000)]
Add comment to remind myself.

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

17 years agovrt.h is not needed here.
phk [Sun, 5 Aug 2007 20:57:32 +0000 (20:57 +0000)]
vrt.h is not needed here.

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

17 years agoAdd a missing return: we always return after detecting the first error.
phk [Sun, 5 Aug 2007 20:57:20 +0000 (20:57 +0000)]
Add a missing return: we always return after detecting the first error.

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

17 years agoAdd missing assert
phk [Sun, 5 Aug 2007 20:47:16 +0000 (20:47 +0000)]
Add missing assert

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

17 years agoWe need the math library on some systems.
phk [Sun, 5 Aug 2007 20:26:09 +0000 (20:26 +0000)]
We need the math library on some systems.

Ticket 138

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

17 years agoMake the nonexistence of "nobody" and "nogroup" users and groups nonfatal
phk [Sun, 5 Aug 2007 20:17:49 +0000 (20:17 +0000)]
Make the nonexistence of "nobody" and "nogroup" users and groups nonfatal

Ticket: 140

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

17 years agoIntroduce a "replace()" function to replace a malloc'ed string.
phk [Sun, 5 Aug 2007 19:52:23 +0000 (19:52 +0000)]
Introduce a "replace()" function to replace a malloc'ed string.

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

17 years agoSynchronize the paramters after we call their accessor functions rather
phk [Sun, 5 Aug 2007 19:37:44 +0000 (19:37 +0000)]
Synchronize the paramters after we call their accessor functions rather
than when we don't find one.

This makes changing runtime paramters work again, without the need to
ask for a nonexistent parameter to trigger the update.

Ticket: 136

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

17 years agoTry harder to avoid integer overflows in cache file size calculations
des [Fri, 3 Aug 2007 18:50:05 +0000 (18:50 +0000)]
Try harder to avoid integer overflows in cache file size calculations
on 32-bit platforms.

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

17 years agoSynchronize these two files.
des [Fri, 3 Aug 2007 18:46:43 +0000 (18:46 +0000)]
Synchronize these two files.

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

17 years agoFine-tune the vhost example.
des [Tue, 31 Jul 2007 06:06:28 +0000 (06:06 +0000)]
Fine-tune the vhost example.

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

17 years agoNote that MAX_IOVS is intentionally not equal to IOV_MAX.
des [Mon, 30 Jul 2007 14:39:03 +0000 (14:39 +0000)]
Note that MAX_IOVS is intentionally not equal to IOV_MAX.

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

17 years agoI accidentally committed the wrong patch in r1787; this corrects the logic
des [Mon, 30 Jul 2007 14:31:16 +0000 (14:31 +0000)]
I accidentally committed the wrong patch in r1787; this corrects the logic
used to determine which lock type (shared or exclusive) to use.

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

17 years agoBogons in previous commit. Pass me the pointy hat...
des [Mon, 30 Jul 2007 14:22:00 +0000 (14:22 +0000)]
Bogons in previous commit.  Pass me the pointy hat...

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

17 years agopid_t is not necessarily compatible with int.
des [Mon, 30 Jul 2007 14:19:45 +0000 (14:19 +0000)]
pid_t is not necessarily compatible with int.

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

17 years agoUse fcntl(2)-style locks instead of non-portable flock(2)-style locks.
des [Mon, 30 Jul 2007 14:16:23 +0000 (14:16 +0000)]
Use fcntl(2)-style locks instead of non-portable flock(2)-style locks.

Based on Theo Schlossnagle's Solaris portability patch.

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

17 years agoExplicitly set TZ to GMT.
des [Mon, 30 Jul 2007 13:54:48 +0000 (13:54 +0000)]
Explicitly set TZ to GMT.

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

17 years agoUse mktime() rather than the unportable timegm(). The downside is that we're
des [Mon, 30 Jul 2007 13:50:16 +0000 (13:50 +0000)]
Use mktime() rather than the unportable timegm().  The downside is that we're
at the mercy of the TZ environment variable.

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

17 years agoAvoid using non-portable <err.h>.
des [Mon, 30 Jul 2007 09:49:05 +0000 (09:49 +0000)]
Avoid using non-portable <err.h>.

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

17 years agoAvoid referencing <sys/cdefs.h> and __{BEGIN,END}_DECLS.
des [Mon, 30 Jul 2007 08:03:42 +0000 (08:03 +0000)]
Avoid referencing <sys/cdefs.h> and __{BEGIN,END}_DECLS.

Based on Theo Schlossnagle's Solaris portability patch.

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

17 years agoAdd a slew of utilities to simplify the writing of test cases. Rewrite the
des [Sat, 28 Jul 2007 15:29:31 +0000 (15:29 +0000)]
Add a slew of utilities to simplify the writing of test cases.  Rewrite the
existing test cases to take advantage of these utilities.

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

17 years agoEmpty responses are not necessarily incorrect, even if Content-Length is
des [Sat, 28 Jul 2007 11:41:35 +0000 (11:41 +0000)]
Empty responses are not necessarily incorrect, even if Content-Length is
non-zero.

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

17 years agoReverse the logic for sp->wantbody: assume it is always wanted unless
des [Sat, 28 Jul 2007 10:03:29 +0000 (10:03 +0000)]
Reverse the logic for sp->wantbody: assume it is always wanted unless
req.request is "HEAD".  This is what broke the RePurge test case.

Ideally, sp->wantbody would be controllable by VCL.

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

17 years agoRefactor this test case. Note that it still fails; there seems to be
des [Sat, 28 Jul 2007 09:23:52 +0000 (09:23 +0000)]
Refactor this test case.  Note that it still fails; there seems to be
something wrong with the synthetic response code in varnishd.

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

17 years agoAdded a health parameter for the backend. This is readable in vcl with backend.health.
cecilihf [Fri, 27 Jul 2007 14:16:39 +0000 (14:16 +0000)]
Added a health parameter for the backend. This is readable in vcl with backend.health.
Made it possible to pass a vcl variable to error (error 200 backend.health).
Implemented a first attempt at an algorithm for checking the health of a backend.
Negative values means the backend has problems, positive values means it is ok. 0 is neutral,
and could mean that it has been a while since the backend was asked for anything.
See the code for details.

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

17 years agoAdd change log for 1.1.1 + various prop fixes
des [Thu, 26 Jul 2007 13:53:41 +0000 (13:53 +0000)]
Add change log for 1.1.1 + various prop fixes

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

17 years agoWhitespace & indentation
des [Thu, 26 Jul 2007 07:51:09 +0000 (07:51 +0000)]
Whitespace & indentation

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

17 years agofix props
des [Thu, 26 Jul 2007 07:45:37 +0000 (07:45 +0000)]
fix props

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

17 years agoRename to a more easily remembered (and typed) name.
des [Thu, 26 Jul 2007 07:45:23 +0000 (07:45 +0000)]
Rename to a more easily remembered (and typed) name.

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

17 years agoCorrect copyright years.
des [Thu, 26 Jul 2007 07:43:37 +0000 (07:43 +0000)]
Correct copyright years.

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

17 years agoRegression test for http purge with regexp
cecilihf [Thu, 26 Jul 2007 07:02:20 +0000 (07:02 +0000)]
Regression test for http purge with regexp

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

17 years agoImplement the full range syntax, eliminating the need for -l. Also
des [Wed, 25 Jul 2007 12:49:21 +0000 (12:49 +0000)]
Implement the full range syntax, eliminating the need for -l.  Also
reintroduce -v, which is required by the spec (though we do not use it).

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

17 years agoAllow values to be specified as arithmetic expressions written in Lisp-like
des [Wed, 25 Jul 2007 11:52:51 +0000 (11:52 +0000)]
Allow values to be specified as arithmetic expressions written in Lisp-like
prefix notation.  Use this to compute the cache hit ratio in the same
manner as the Nagios plugin does, and to compute cache file usage.

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

17 years agoSet x bit.
des [Wed, 25 Jul 2007 11:16:42 +0000 (11:16 +0000)]
Set x bit.

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

17 years agoAdd a "usage" parameter which reports cache file usage.
des [Wed, 25 Jul 2007 11:13:32 +0000 (11:13 +0000)]
Add a "usage" parameter which reports cache file usage.

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

17 years agoStyle...
cecilihf [Wed, 25 Jul 2007 11:10:59 +0000 (11:10 +0000)]
Style...

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

17 years agoUse purge in function names instead of repurge and move VRT_purge to cache_vrt.c.
cecilihf [Wed, 25 Jul 2007 11:09:06 +0000 (11:09 +0000)]
Use purge in function names instead of repurge and move VRT_purge to cache_vrt.c.

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

17 years agoTypo.
des [Wed, 25 Jul 2007 11:08:24 +0000 (11:08 +0000)]
Typo.

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

17 years agoStyle fixes
des [Wed, 25 Jul 2007 11:04:50 +0000 (11:04 +0000)]
Style fixes

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

17 years agoUpdated man page
cecilihf [Wed, 25 Jul 2007 08:53:16 +0000 (08:53 +0000)]
Updated man page

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

17 years agoImplemented http purge with regexp. Example vcl usage:
cecilihf [Wed, 25 Jul 2007 08:39:10 +0000 (08:39 +0000)]
Implemented http purge with regexp. Example vcl usage:
sub vcl_recv {
if (req.request == "REPURGE") {
purge(req.url);
error 404 "Purged";
}
}

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

17 years agoCleanup, rename "hitrate" to "ratio" as in Munin plugin.
des [Tue, 24 Jul 2007 16:42:36 +0000 (16:42 +0000)]
Cleanup, rename "hitrate" to "ratio" as in Munin plugin.

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