]> err.no Git - varnish/log
varnish
16 years agoTweak a startup message.
des [Tue, 18 Dec 2007 17:02:05 +0000 (17:02 +0000)]
Tweak a startup message.

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

16 years agoBuild the 1.1.2 change log.
des [Tue, 18 Dec 2007 17:00:29 +0000 (17:00 +0000)]
Build the 1.1.2 change log.

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

16 years agoFull change log for 1.1.2 (corresponding to branches/1.1 as of today).
des [Tue, 18 Dec 2007 17:00:19 +0000 (17:00 +0000)]
Full change log for 1.1.2 (corresponding to branches/1.1 as of today).
References to tickets have been included where I have been able to track
down the ticket corresponding to a particular commit.

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

16 years agoOrder change logs in reverse chronological order to make it easier to add
des [Tue, 18 Dec 2007 16:50:26 +0000 (16:50 +0000)]
Order change logs in reverse chronological order to make it easier to add
new ones.

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

16 years agoAdd $NOTES as a hack to document the fact that we know 1.1.2 fails some of
des [Tue, 18 Dec 2007 16:47:44 +0000 (16:47 +0000)]
Add $NOTES as a hack to document the fact that we know 1.1.2 fails some of
the tests.  This should be revisited later; ideally, the framework should
know which tests are expected to pass and which are expected to fail, and
flag any deviation (if a test is expected to fail but passes, it is
probable that the test is broken)

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

16 years agoFixed a small typo in the varnishd man page
ssm [Tue, 18 Dec 2007 06:58:33 +0000 (06:58 +0000)]
Fixed a small typo in the varnishd man page

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

16 years agoWhen an object is being fetched from the backend, other requests for it
phk [Tue, 11 Dec 2007 12:04:58 +0000 (12:04 +0000)]
When an object is being fetched from the backend, other requests for it
are parked not holding a worker thread, until the fetching session lowers
the busy bit on the object.

At that point we would release all the parked requests into the thread
pool to be serviced, causing instant congestion and calls for road-pricing
if the backend were a bit slow on an oft-requested object.

Change the restart policy to be paced exponential:

When we clear the busy bits, we unpark "rush_exponent" requests into
the thread pool to start the show.

Whenever the object is dereferenced, in practice whenever a request
has been serviced, another "rush_exponent" worth of requests are
unparked into the tread pool.

Set the parameter to a conservative 3 until we know more about the
behaviour in practice.

If it is a big object and/or the clients are on slow lines, 3 may
be an order of magnitude to small.

Attempts to fix: #188

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

16 years agoAttempt to name threads if possible.
phk [Tue, 11 Dec 2007 09:03:51 +0000 (09:03 +0000)]
Attempt to name threads if possible.

On FreeBSD this means that for instance "top -H" will show the
varnish threads as "cache-foo" for various values of foo, hopefully
giving us another debugging hint.

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

16 years agoCheck if our pthreads sports a pthread_set_name_np() function.
phk [Tue, 11 Dec 2007 09:02:29 +0000 (09:02 +0000)]
Check if our pthreads sports a pthread_set_name_np() function.

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

16 years agoDebian packaging: Remove extra debhelper section in main postinst file, this
ssm [Tue, 11 Dec 2007 07:02:24 +0000 (07:02 +0000)]
Debian packaging: Remove extra debhelper section in main postinst file, this
was included by the debhelper tag as well, which resulted in a double startup
entry, and an error on package installation.

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

16 years agoChanges in the Debian packaging
ssm [Tue, 11 Dec 2007 06:14:49 +0000 (06:14 +0000)]
Changes in the Debian packaging

* Use native version for the debian package
* Add headers to indicate location of varnish source
* Add "xsltproc" to build dependencies

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

16 years agoDebian packaging: do not ignore all errors from make distclean
ssm [Tue, 11 Dec 2007 06:10:47 +0000 (06:10 +0000)]
Debian packaging: do not ignore all errors from make distclean

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

16 years agoIn the debian /etc/default/varnish, remove unused configuration variable, and
ssm [Tue, 11 Dec 2007 05:46:43 +0000 (05:46 +0000)]
In the debian /etc/default/varnish, remove unused configuration variable, and
an erroneous use of -n from the configuration examples.

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

16 years agoGo over the shmlog header processing.
phk [Mon, 10 Dec 2007 08:55:17 +0000 (08:55 +0000)]
Go over the shmlog header processing.

Add a byte to the length field, but retain the 255 bytes restriction
for now.

Add symbolic names for the header fields and macros for multi-byte
fields, and uses these throughout.   This will make it easier next time.

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

16 years agoTCP connections don't quite behave like other fds, and we need to handle
phk [Fri, 7 Dec 2007 12:03:58 +0000 (12:03 +0000)]
TCP connections don't quite behave like other fds, and we need to handle
that for the managers CLI event-engine:

React to POLLNVAL as we would to POLLHUP

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

16 years agoAlso accept the undocumented ENOTCONN error return from close(2).
phk [Fri, 23 Nov 2007 10:47:16 +0000 (10:47 +0000)]
Also accept the undocumented ENOTCONN error return from close(2).

See also http://www.version2.dk/artikel/5153 if you read danish.

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

16 years agoTell people what to do when running in debug mode
phk [Fri, 23 Nov 2007 10:18:46 +0000 (10:18 +0000)]
Tell people what to do when running in debug mode

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

16 years agoPlug these two test-scripts in for the night, until some day where
phk [Tue, 20 Nov 2007 22:28:04 +0000 (22:28 +0000)]
Plug these two test-scripts in for the night, until some day where
I find out where to put ad-hoc stuff like this in the tree.

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

16 years agoAdd esi:comment support. "Support" is defined as: Silently ignore,
phk [Tue, 20 Nov 2007 22:21:05 +0000 (22:21 +0000)]
Add esi:comment support.  "Support" is defined as: Silently ignore,
as opposed to unhandled esi: elments which we complain about in
varnishlog.

Thus, if you want to get a short comment into the shmlog, the
easiest way is to do something like <esi:say a="Hi Mom"> which will
result in a shmlog record:
   11 ESI_xmlerror c at 25: ESI 1.0 unimplemented element "<esi:say Hi Mom>"
But the length of the message is truncated to avoid dumping the entire
source document into the shmlog.

Snip out any unknown esi: element.

While the ESI 1.0 specification doesn't address this directly, my
impression from the document is that they should never leak through
to the client.

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

16 years agoMake <![CDATA[...]]> stateful and handle it correctly across
phk [Tue, 20 Nov 2007 21:47:37 +0000 (21:47 +0000)]
Make <![CDATA[...]]> stateful and handle it correctly across
storage boundaries.  Complain if it isn't closed at the end.

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

16 years agoHandle unreasonably long (ie: larger than the objects workspace) elements
phk [Tue, 20 Nov 2007 21:27:20 +0000 (21:27 +0000)]
Handle unreasonably long (ie: larger than the objects workspace) elements
gracefully.

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

16 years agoWarn about XML/ESI language elements that are not properly closed.
phk [Tue, 20 Nov 2007 21:01:00 +0000 (21:01 +0000)]
Warn about XML/ESI language elements that are not properly closed.

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

16 years agoStorage border bug fixes
phk [Tue, 20 Nov 2007 20:41:19 +0000 (20:41 +0000)]
Storage border bug fixes

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

16 years agoImplement almost complete ESI parsing for objects spanning multiple
phk [Tue, 20 Nov 2007 20:08:13 +0000 (20:08 +0000)]
Implement almost complete ESI parsing for objects spanning multiple
storage chunks.

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

16 years agoMake sure to add verbatim anything leading up to whatever we fail
phk [Tue, 20 Nov 2007 18:33:09 +0000 (18:33 +0000)]
Make sure to add verbatim anything leading up to whatever we fail
to parse due to lack of bytes.

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

16 years agoReset the objects length to zero after we zapped all its component
phk [Tue, 20 Nov 2007 17:20:47 +0000 (17:20 +0000)]
Reset the objects length to zero after we zapped all its component
parts, otherwise we will get trouble (#167 ?) later.

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

16 years agoPass a txt instead of the raw storage into the esi_parser
phk [Tue, 20 Nov 2007 16:43:09 +0000 (16:43 +0000)]
Pass a txt instead of the raw storage into the esi_parser

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

16 years agoMake the incmt and remflg persistent across the parse chunks
phk [Tue, 20 Nov 2007 16:30:23 +0000 (16:30 +0000)]
Make the incmt and remflg persistent across the parse chunks

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

16 years agoMany of our assertions have side effects, so the condition needs to be
des [Tue, 20 Nov 2007 14:58:51 +0000 (14:58 +0000)]
Many of our assertions have side effects, so the condition needs to be
evaluated even if we don't bother to check the result.  We should trust
the compiler to eliminate code that has no effect.

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

16 years agoFix some style issues, and harmonize with varnishncsa(1).
des [Tue, 20 Nov 2007 14:56:21 +0000 (14:56 +0000)]
Fix some style issues, and harmonize with varnishncsa(1).

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

16 years agoMake SIGHUP work: VSL_Dispatch() will not return as long as it has data
des [Tue, 20 Nov 2007 14:55:49 +0000 (14:55 +0000)]
Make SIGHUP work: VSL_Dispatch() will not return as long as it has data
to feed to h_ncsa(), so it is up to h_ncsa() to interrupt it if reopen
is non-zero.

Also remove a superfluous call to VSL_Arg() as was previously done in
varnishlog(1).

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

16 years agoAlso accept deferred EBADF errors.
phk [Tue, 20 Nov 2007 14:32:01 +0000 (14:32 +0000)]
Also accept deferred EBADF errors.

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

16 years agoHandle that the sessions may be killed the worker thread before
phk [Tue, 20 Nov 2007 14:20:36 +0000 (14:20 +0000)]
Handle that the sessions may be killed the worker thread before
we get around to delete the kevent.

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

16 years agoUse a bitmap to check if we own a given file handle, before we
phk [Tue, 20 Nov 2007 12:11:04 +0000 (12:11 +0000)]
Use a bitmap to check if we own a given file handle, before we
do anything about the associated session.

May be relevant relative to: #162

(Bitmap functions slightly general, for possible later reuse)

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

16 years agoSimplify the generation of error responses.
phk [Tue, 20 Nov 2007 12:01:40 +0000 (12:01 +0000)]
Simplify the generation of error responses.

Don't take a detour around cache_response.c, go directly to
cache_synthetic.c.

Don't wast time and energy mucking about with pseudo-objects,
just synthesize the error body directly in the workspace and
send it from there.

Close the session after sending error response, freeing up
resources sounds like a good strategy. (XXX: for futher study).

This might be related to #167

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

16 years agoWe should never have an object when we hit the error state.
phk [Tue, 20 Nov 2007 11:23:37 +0000 (11:23 +0000)]
We should never have an object when we hit the error state.

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

16 years agoWhen closing a backend connection, we can run into a ECONNRESET which
phk [Tue, 20 Nov 2007 11:11:17 +0000 (11:11 +0000)]
When closing a backend connection, we can run into a ECONNRESET which
given circumstances is fair game.

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

16 years agoAdd some asserts to the plumbing around the C-compiler invocation.
phk [Tue, 20 Nov 2007 11:07:47 +0000 (11:07 +0000)]
Add some asserts to the plumbing around the C-compiler invocation.

Collect any messages from the C-compiler and pass them on to the
user, but do not take them as evidence of a failed compilation,
check the returnvalue for that.

To avoid confusion, explicitly say when the VCL program was compiled.

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

16 years agoChange the assert() that triggers in #167 to spassert().
des [Thu, 15 Nov 2007 16:02:05 +0000 (16:02 +0000)]
Change the assert() that triggers in #167 to spassert().

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

16 years agoBigger hammer: panic() is similar to lbv_assert() but takes a struct sess *
des [Thu, 15 Nov 2007 16:01:21 +0000 (16:01 +0000)]
Bigger hammer: panic() is similar to lbv_assert() but takes a struct sess *
from which it tries to extract as much useful information as possible before
it croaks.  The corresponding macro is spassert(), which assumes you have
a struct sess *sp in scope.  This should help a lot with bugs like #167
where important information is not available post-mortem (because sp->obj
points into the cache, which is not included in the core dump)

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

16 years agoAdd a VALID_OBJ() predicate macro.
des [Thu, 15 Nov 2007 15:07:15 +0000 (15:07 +0000)]
Add a VALID_OBJ() predicate macro.

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

16 years agoWhitespace cleanup
des [Thu, 15 Nov 2007 14:18:39 +0000 (14:18 +0000)]
Whitespace cleanup

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

16 years agoForgot to commit this when vtmpfile.c was added.
des [Fri, 9 Nov 2007 22:59:44 +0000 (22:59 +0000)]
Forgot to commit this when vtmpfile.c was added.

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

16 years agoClean up the code a bit, and warn the user when changing a parameter that
des [Fri, 9 Nov 2007 14:44:27 +0000 (14:44 +0000)]
Clean up the code a bit, and warn the user when changing a parameter that
requires the child to be restarted or the VCL script to be reloaded.

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

16 years agoSignificant rewrite of the code used to invoke the C compiler. The most
des [Fri, 9 Nov 2007 14:10:15 +0000 (14:10 +0000)]
Significant rewrite of the code used to invoke the C compiler.  The most
important functional change is that the source is no longer piped to the
compiler; instead, the source file name (which now ends in .c) is passed
on the command line.  This makes it *much* easier to support non-GNU
compilers.

The cc_command parameter processed by a custom function instead of sprintf;
"%s" is replaced with the source file name, "%o" is replaced with the output
file name, and "%%" is replaced with a single "%".

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

16 years agoAdd our own mkstemp(3) clone which allows the template to contain non-
des [Fri, 9 Nov 2007 14:03:13 +0000 (14:03 +0000)]
Add our own mkstemp(3) clone which allows the template to contain non-
placeholder characters after the placeholders.

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

16 years agoWhitespace cleanup.
des [Fri, 9 Nov 2007 12:43:09 +0000 (12:43 +0000)]
Whitespace cleanup.

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

16 years agoWhen diagnostics are enabled, log every kevent that has a session associated
des [Fri, 9 Nov 2007 11:19:45 +0000 (11:19 +0000)]
When diagnostics are enabled, log every kevent that has a session associated
with it.

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

16 years agoIgnore config.cache.
des [Thu, 8 Nov 2007 21:33:53 +0000 (21:33 +0000)]
Ignore config.cache.

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

16 years agoNit
des [Thu, 8 Nov 2007 21:32:42 +0000 (21:32 +0000)]
Nit

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

16 years agoMinimal intervention fix for #162: we can delay arming a kevent, but we
des [Thu, 8 Nov 2007 20:30:06 +0000 (20:30 +0000)]
Minimal intervention fix for #162: we can delay arming a kevent, but we
can't delay disarming it, or we will have a race between the acceptor and
a worker thread.  This will need revisiting at some later date.

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

16 years agoPressing 0-9 will change the delay to the corresponding power of two (e.g.
des [Thu, 8 Nov 2007 16:52:40 +0000 (16:52 +0000)]
Pressing 0-9 will change the delay to the corresponding power of two (e.g.
press 3 for 2^3 = 8 seconds)

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

16 years agoCopy&paste -D (daemonize) from varnishlog.
des [Thu, 8 Nov 2007 16:28:26 +0000 (16:28 +0000)]
Copy&paste -D (daemonize) from varnishlog.

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

16 years agoPick some nits.
des [Thu, 8 Nov 2007 16:27:53 +0000 (16:27 +0000)]
Pick some nits.

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

16 years agoTypo in previous commit.
des [Sat, 3 Nov 2007 12:30:06 +0000 (12:30 +0000)]
Typo in previous commit.

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

16 years agoTest whether SO_{RCV,SND}TIMEO work (they are defined but unimplemented
des [Fri, 2 Nov 2007 14:09:17 +0000 (14:09 +0000)]
Test whether SO_{RCV,SND}TIMEO work (they are defined but unimplemented
on Solaris, so simply checking for their presence is not enough)

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

16 years agoFix the struct statvfs issue.
des [Thu, 1 Nov 2007 21:57:44 +0000 (21:57 +0000)]
Fix the struct statvfs issue.

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

16 years agoHeader cleanup.
des [Thu, 1 Nov 2007 21:53:59 +0000 (21:53 +0000)]
Header cleanup.

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

16 years agoDon't rely on non-portable <paths.h>
des [Thu, 1 Nov 2007 21:52:34 +0000 (21:52 +0000)]
Don't rely on non-portable <paths.h>

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

16 years agoAdd missing <strings.h>
des [Thu, 1 Nov 2007 21:48:54 +0000 (21:48 +0000)]
Add missing <strings.h>

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

16 years agoAdd Solaris support. Avoid kshisms.
des [Thu, 1 Nov 2007 21:47:58 +0000 (21:47 +0000)]
Add Solaris support.  Avoid kshisms.

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

16 years agoRefine the debugging string: we don't really need the XID, but we do need
des [Tue, 30 Oct 2007 14:40:55 +0000 (14:40 +0000)]
Refine the debugging string: we don't really need the XID, but we do need
the thread ID in order to locate the correct thread in gdb.  Furthermore,
we must use VSL rather than WSL since the session might actually not have
a worker at that point; but if it does, make sure to flush the log first.

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

16 years agoWhen DIAGNOSTICS is defined, log every step that each session goes through,
des [Tue, 30 Oct 2007 14:06:37 +0000 (14:06 +0000)]
When DIAGNOSTICS is defined, log every step that each session goes through,
along with some vital statistics, and flush the log regularly.

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

16 years agor2208 was correct but incomplete. It is possible for a session to reach
des [Tue, 30 Oct 2007 14:02:58 +0000 (14:02 +0000)]
r2208 was correct but incomplete.  It is possible for a session to reach
cnt_done() without a VCL reference, if we never got a request on that
connection.  However, a session that reaches cnt_again() will never have
a VCL reference, so the assertion there is incorrect.

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

16 years agoSimplify WS_DEBUG(), and make it conditional on DIAGNOSTICS.
des [Tue, 30 Oct 2007 13:42:52 +0000 (13:42 +0000)]
Simplify WS_DEBUG(), and make it conditional on DIAGNOSTICS.

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

16 years agoEnable diagnostics
des [Tue, 30 Oct 2007 13:41:56 +0000 (13:41 +0000)]
Enable diagnostics

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

16 years agoAdd an --enable-diagnostics option which causes DIAGNOSTICS to be defined.
des [Tue, 30 Oct 2007 13:39:21 +0000 (13:39 +0000)]
Add an --enable-diagnostics option which causes DIAGNOSTICS to be defined.

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

16 years agoRevert r2208, I believe the assert is correct.
des [Tue, 30 Oct 2007 12:57:03 +0000 (12:57 +0000)]
Revert r2208, I believe the assert is correct.

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

16 years agoUse pdiff()
des [Tue, 30 Oct 2007 12:54:10 +0000 (12:54 +0000)]
Use pdiff()

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

16 years agoAFAICT, it is perfectly valid for sp->vcl to be NULL here.
des [Tue, 30 Oct 2007 12:38:34 +0000 (12:38 +0000)]
AFAICT, it is perfectly valid for sp->vcl to be NULL here.

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

16 years agoIncomplete change log for 1.1.2
des [Tue, 30 Oct 2007 12:36:09 +0000 (12:36 +0000)]
Incomplete change log for 1.1.2

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

16 years agoComment tweak
des [Tue, 30 Oct 2007 12:35:40 +0000 (12:35 +0000)]
Comment tweak

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

16 years agoUse a cast to prevent sign extension instead of masking it off after the fact.
des [Tue, 30 Oct 2007 10:48:30 +0000 (10:48 +0000)]
Use a cast to prevent sign extension instead of masking it off after the fact.

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

16 years agoAdd more paranoia
phk [Mon, 29 Oct 2007 12:22:38 +0000 (12:22 +0000)]
Add more paranoia

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

16 years agoGive struct ws the mini_obj treatment, not sure why I didn't before.
phk [Mon, 29 Oct 2007 12:10:16 +0000 (12:10 +0000)]
Give struct ws the mini_obj treatment, not sure why I didn't before.

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

16 years agoTypo in previous commit.
phk [Mon, 29 Oct 2007 12:09:54 +0000 (12:09 +0000)]
Typo in previous commit.

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

16 years agoMore checks, trying to find pointer tango
phk [Mon, 29 Oct 2007 12:06:34 +0000 (12:06 +0000)]
More checks, trying to find pointer tango

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

16 years agoMake bereq. available from vcl_fetch()
phk [Mon, 29 Oct 2007 10:22:22 +0000 (10:22 +0000)]
Make bereq. available from vcl_fetch()

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

16 years agoImplement relative URL for esi:include. Use the bereq.url as
phk [Mon, 29 Oct 2007 10:20:36 +0000 (10:20 +0000)]
Implement relative URL for esi:include.  Use the bereq.url as
starting point, since req.url may have been rewritten underway.
Store result in objects workspace.

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

16 years agoPostpone freeing the bereq until after VCL_fetch() has been called
phk [Mon, 29 Oct 2007 10:17:58 +0000 (10:17 +0000)]
Postpone freeing the bereq until after VCL_fetch() has been called

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

16 years agoGive workspaces an identifying string to aid debugging.
phk [Mon, 29 Oct 2007 09:28:21 +0000 (09:28 +0000)]
Give workspaces an identifying string to aid debugging.

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

16 years agoAdd compile-time selectable SHMlogging of WS-activity
phk [Mon, 29 Oct 2007 09:24:16 +0000 (09:24 +0000)]
Add compile-time selectable SHMlogging of WS-activity

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

16 years agoRemember to reset te bereq's workspace after use.
phk [Mon, 29 Oct 2007 09:16:13 +0000 (09:16 +0000)]
Remember to reset te bereq's workspace after use.

NB: This should be merged back to 1.1

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

16 years agoMask negative characters to 8 bit before formatting.
phk [Mon, 29 Oct 2007 08:24:04 +0000 (08:24 +0000)]
Mask negative characters to 8 bit before formatting.

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

16 years agoIf we find no ESI elements of an object, don't penalize it with ESI's
phk [Mon, 29 Oct 2007 08:16:22 +0000 (08:16 +0000)]
If we find no ESI elements of an object, don't penalize it with ESI's
chunked delivery.

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

16 years agoDon't complain about unrecognized <! sequences, just treat them like
phk [Mon, 29 Oct 2007 08:09:28 +0000 (08:09 +0000)]
Don't complain about unrecognized <! sequences, just treat them like
any other <...>

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

16 years agoIssue an VCL_error if 'esi' is not used from vcl_fetch.
phk [Mon, 29 Oct 2007 07:53:27 +0000 (07:53 +0000)]
Issue an VCL_error if 'esi' is not used from vcl_fetch.

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

16 years agoGive VRT code a chance to see which method we are in.
phk [Mon, 29 Oct 2007 07:53:01 +0000 (07:53 +0000)]
Give VRT code a chance to see which method we are in.

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

16 years agoAdd a VCL_error shmtag
phk [Mon, 29 Oct 2007 07:46:12 +0000 (07:46 +0000)]
Add a VCL_error shmtag

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

16 years agoFix file list.
des [Sun, 28 Oct 2007 18:43:24 +0000 (18:43 +0000)]
Fix file list.

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

16 years agoDon't mess up the chunked encoding for nested esi:include
phk [Fri, 26 Oct 2007 11:13:32 +0000 (11:13 +0000)]
Don't mess up the chunked encoding for nested esi:include

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

16 years agoMore ESI work, now full URL srcs (http://...) work in addition to
phk [Fri, 26 Oct 2007 11:00:25 +0000 (11:00 +0000)]
More ESI work, now full URL srcs (http://...) work in addition to
absolute src ("/...").  Relative src's coming up next, once I find
out where to store the edited string.

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

16 years agoPush hole through the esi:include path, making a very trivial example
phk [Wed, 24 Oct 2007 20:34:24 +0000 (20:34 +0000)]
Push hole through the esi:include path, making a very trivial example
work fully, leaving a trail of XXX and other devastation:

Add an esi nesting counter to the session.

Teach RES_WriteObj() to send an object as a chunk in chunked encoding.

Bail cnt_done() early for nested ESI transactions.

Catch the src="" attribute in esi:include and store it in the esibit.

In ESI_Deliver(), recurse into CNT_Session(STP_RECV) in order to handle
the include element of an esibit.

Recursion is probably not the ideal solution here, but it might quite
conceiveably be the best one, since it is quite cheap and very trivial.

Outstanding issues: too many to list still.

The following example worked for me:

<html>
<body>
<pre>
<esi:include src="/esi.txt"/>
</pre>
</body>
</html>

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

16 years agoAdd attribute parsing
phk [Wed, 24 Oct 2007 19:38:43 +0000 (19:38 +0000)]
Add attribute parsing

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

16 years agoSplit STP_RECV in two:
phk [Wed, 24 Oct 2007 18:38:17 +0000 (18:38 +0000)]
Split STP_RECV in two:

STP_START is the initial setup of a viable workerthread:  Dissecting
HTTP, getting vcl reference etc.

STP_RECV is invoking vcl_recv() and following orders.

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

16 years agoGently shuffle closer to being able to restart a esi:include on the next
phk [Wed, 24 Oct 2007 14:32:12 +0000 (14:32 +0000)]
Gently shuffle closer to being able to restart a esi:include on the next
element:

Add two checkpoints for the sessions workspace.

The first checkpoint is after the session fixed data, and move the
client address and port to workspace to see that this works.

The second checkpoint is after the, as received unadultered by VCL
http request.  Grab a copy of the http request matching this.

Implement rollback as an optional feature of restart in VCL.

Move various workspace initialization and resetting operations to more
suitable locations in the program flow.

I don't know if this is really usable, but now it's possible to do:

backend b1 {
set backend.host = "backend1";
set backend.port = "80";
}

backend b2 {
set backend.host = "backend2";
set backend.port = "80";
}

sub vcl_recv {
set req.backend = b1;
remove req.http.cookie;

if (req.restarts == 0) {
set req.url = "foobar.html";
} else {
set req.backend = b2;
}
}

sub vcl_fetch {
if (obj.status != 200) {
restart rollback;
}
}

And have it first look for "foobar.html" on one backend, and failing
that, try to give the user what they asked for from the other backend.

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

16 years agoAdd a WS_Dup() function
phk [Wed, 24 Oct 2007 10:24:08 +0000 (10:24 +0000)]
Add a WS_Dup() function

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

16 years agoCheck for a negative return from HTC_Rx(). Probably needs revisiting.
des [Tue, 23 Oct 2007 12:36:34 +0000 (12:36 +0000)]
Check for a negative return from HTC_Rx().  Probably needs revisiting.

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

16 years agoSupply reasonable defaults for error code / reason.
des [Tue, 23 Oct 2007 12:35:29 +0000 (12:35 +0000)]
Supply reasonable defaults for error code / reason.

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

16 years agoAdd a test case for the root cause of #164, which is that the backend sends
des [Tue, 23 Oct 2007 11:57:16 +0000 (11:57 +0000)]
Add a test case for the root cause of #164, which is that the backend sends
a garbled response (or no response at all).

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