]>
err.no Git - varnish/log
des [Wed, 23 Jan 2008 16:23:28 +0000 (16:23 +0000)]
It is possible for VSS_parse() to succeed and return a NULL addr but a
non-NULL port (e.g. ":80" which is a valid listening address). In that
case, port should be free()d before returning.
Coverity Scan (CID:15)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2379
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Wed, 23 Jan 2008 16:11:31 +0000 (16:11 +0000)]
Implement URL banning. It is now possible to use the Apache http
manual as a test data set.
Consistently parenthesize print().
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2378
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Wed, 23 Jan 2008 15:45:03 +0000 (15:45 +0000)]
Don't assume that res0 != NULL automatically means i == 0. I can't say for
sure (without more coffee) that the assumption is incorrect, but it makes
the code gratuitously non-transparent.
Coverity Scan (CID:8)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2375
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Wed, 23 Jan 2008 13:45:48 +0000 (13:45 +0000)]
Add -c and -r options:
- If the former is specified, fetcher will go into a loop after having
traversed the entire tree, and continuously re-fetch all known URLs.
- The latter is not yet implented, but the idea is to assign a random
probability to each URL based on an inverse-exponential (or similar)
distribution, and re-fetch URLs at random according to this frequency.
This will help simulate a "short head long tail" scenario.
Some restructuring.
Add a comment about a possible improvement which will help work around
bugs in certain commonly used data sets (e.g. the Apache httpd manual)
which can result in an infinite set of URLs (which in reality map to
a fairly large but finite set of pages)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2374
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 23 Jan 2008 10:20:12 +0000 (10:20 +0000)]
Always dispose of the reason from mgt_cli_askchild() properly.
Coverty Scan (CID: 12-14,16)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2373
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 23 Jan 2008 10:13:43 +0000 (10:13 +0000)]
mgt_cli_askchild() always returns a pointer.
Coverity Scan (CID:12)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2372
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 23 Jan 2008 10:05:45 +0000 (10:05 +0000)]
Make sure to always NULL the pointer argument to cli_readres().
Implicated in Coverity Scan (CID:12-16)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2371
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 23 Jan 2008 09:46:13 +0000 (09:46 +0000)]
Protect all vsb's (sbufs) with an assert that they did not overflow.
I don't think it is likely that they would, but some users are running
out of memory, so make it deterministic when it happens.
Noticed by Coverity Scan (CID: 4-6)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2370
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 23 Jan 2008 09:26:03 +0000 (09:26 +0000)]
Make sure WRK_Flush() always resets w->niov so WRK_Write() does not
overrun the w->iov.
Because niov is right after iov in struct worker, it is hard to predict
what the effect of hitting this bug, but "core dump" is almost a given.
I don't think it has been likely to happen a lot however, as it would
require a full complement of HTTP headers or a very fragmented object.
Coverity Scan (CID:7)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2369
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 22 Jan 2008 11:39:58 +0000 (11:39 +0000)]
Add helper functions to check and report errors when fields are defined
too much, too little or just plain wrong.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2368
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 22 Jan 2008 10:48:49 +0000 (10:48 +0000)]
Parse a random director into an appropriate data structure,
still bits missing.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2367
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 22 Jan 2008 09:55:36 +0000 (09:55 +0000)]
Make it possible to refer to backend hosts (== simple backends) by name.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2365
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Tue, 22 Jan 2008 08:36:07 +0000 (08:36 +0000)]
Debian packaging: update changelog
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2361
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 22 Jan 2008 08:32:23 +0000 (08:32 +0000)]
Bail if there are multiple .host or .port fields in one backend host.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2360
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Tue, 22 Jan 2008 08:28:18 +0000 (08:28 +0000)]
Debian packaging: Only reload varnishlog if it is running.
(Debian bug #462029)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2359
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Mon, 21 Jan 2008 19:04:41 +0000 (19:04 +0000)]
Debian packaging: Add a debian revision to the version number
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2357
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 21 Jan 2008 13:09:17 +0000 (13:09 +0000)]
Start the long awaited overhaul of the backend code and syntax.
Off the bat, this affects only the simple backend case, and the
main thrust is a syntax change from a dynamic procedural assignment
style:
backend b1 {
set backend.host = "fs.freebsd.dk";
set backend..port = "80";
}
to a constant structural definition style:
backend b1 {
.host = "fs.freebsd.dk";
.port = "80";
}
A helpfull compile error will advice on this change.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2356
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 18 Jan 2008 10:42:27 +0000 (10:42 +0000)]
Make sure to terminate the movement of a request's body if we get an
EOF from the client.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2355
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Fri, 18 Jan 2008 07:35:17 +0000 (07:35 +0000)]
Use 192.0.2.0/24 in our examples, this net is reserved for documentation in RFC3330
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2354
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 15:15:39 +0000 (15:15 +0000)]
Rework the handling of message-bodies in requests to be closer to
RFC2616 and catch things we don't deal with better.
Move code to receive body from request into separate function,
FetchReqBody() so it can be invoked when center::STP_HIT.
Check read errors and make FetchReqBody() return an error code for
client/server side so we don't penalize backends for client trouble.
Make it a client error, for now, to send chunked encoding.
This also isolates the big stack buffer from the subsequent function
calls in Fetch() and will be saner if we ever add chunked-encoding
handling.
Only send the body to the backend on pass, otherwise discard it.
This is controlled via the sp->sendbody flag which is reset in at
STP_RECV and set it at STP_PASS.
In STP_HIT, on deliver, call FetchReqBody() to dispose of any body
the request might contain.
Filter Content-Length: headers out (c->b) on fetches, but not for pass.
Rewrite default vcl_recv{} to be take advantage of our new capabilities.
This should make PUT, DELETE, OPTIONS, and TRACE work as well as POST.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2353
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 14:53:48 +0000 (14:53 +0000)]
Missed an assignment in last commit.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2352
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 14:49:27 +0000 (14:49 +0000)]
Make the destination pointer optional to http_GetHdr(), we might just
want to know if the header is there at all.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2351
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 11:44:30 +0000 (11:44 +0000)]
Mark return value as intentionally unused.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2350
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 11:39:06 +0000 (11:39 +0000)]
Make Flexelint happier about our private ctype.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2349
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 11:34:28 +0000 (11:34 +0000)]
Introduce the TRUST_ME() macro for voilating the C compilers pointer
sensibilities. If only they had done const right...
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2348
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 11:27:34 +0000 (11:27 +0000)]
Move the enum out of the struct to cater for marginal pedantism on
the part of FlexeLint.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2347
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 10:15:27 +0000 (10:15 +0000)]
fix spelling mistake reported in #183
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2346
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Jan 2008 10:08:34 +0000 (10:08 +0000)]
Fix ticket #179: non-ascii reason-phrase.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2345
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 14 Jan 2008 10:42:56 +0000 (10:42 +0000)]
Pave more road for prefetch:
Sanity-check values assigned to obj.prefetch from VCL: if before present
time or after ttl, SHM a VCL_info message and set obj.prefetch to zero
disabling prefetch.
Change objects/timer interaction: We only keep track of the first timer for
each object (->timer_when) and add a field to remember what we intend to
do at that time (->timer_what).
Rename heap_idx to timer_idx to group the relevant fields (XXX: it should be
accessed through function outside cache_expire.c which should be called
cache_timer.c now).
Abolish the 30 second advance move to death-row.
When the prefetch timer expires, SHM a debug message and don't do anything.
Minor polishing and cleanup.
Add vcl_prefetch{} to default VCL and set prefetch 30 seconds before ttl.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2344
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 14 Jan 2008 10:30:47 +0000 (10:30 +0000)]
Add SHM tag VCL_info for informative messages from VCL execution.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2343
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 14 Jan 2008 09:19:06 +0000 (09:19 +0000)]
Add support for obj.prefetch variable
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2342
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 14 Jan 2008 09:14:56 +0000 (09:14 +0000)]
Add VCC support for:
Variables that can take relative, currently limited to negative,
time intervals.
vcl_prefetch{} method
obj.prefetch variable.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2341
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 14 Jan 2008 08:55:58 +0000 (08:55 +0000)]
Add missing ERRCHK() to suppress subsequent syntax errors.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2340
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 10 Jan 2008 23:16:01 +0000 (23:16 +0000)]
Not all curses have KEY_RESIZE
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2339
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 10 Jan 2008 23:15:39 +0000 (23:15 +0000)]
Use IOV_MAX as limit if it is smaller on (HTTP_HDR_MAX * 2).
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2338
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 14:35:09 +0000 (14:35 +0000)]
Don't even look for senfile, it doesn't work for what we need on
any of the platforms right now.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2337
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 14:16:38 +0000 (14:16 +0000)]
Make inlining C with C{ ... }C legal at the toplevel (in addition to
in compounds).
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2336
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 10:58:04 +0000 (10:58 +0000)]
Simplify calculation of storage file by using str2bytes() function.
Move unsightly #ifdef STATVFS stuff into small helper function.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2335
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Tue, 8 Jan 2008 10:37:07 +0000 (10:37 +0000)]
Remove files which confuse users who mistake them for documentation (see #77).
There may be a case for resurrecting syntax.txt, but only if it is fixed to
reflect what was actually implemented as opposed to what was proposed a year
ago.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2334
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 10:35:29 +0000 (10:35 +0000)]
Extend the str2bytes() function to also cope with percentages of a
size given as parameter.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2333
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 09:56:50 +0000 (09:56 +0000)]
Add -l argument for specifying shared memory log size.
Increase default from 8M to 80M to reduce roll-over frequency on busy servers.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2332
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Jan 2008 09:42:29 +0000 (09:42 +0000)]
Add a str2bytes() function which converts byte size strings to
number of bytes.
In difference from for instance FreeBSD's relatively newly added
expand_number(), this function also takes floatingpoint specifications
like "1.5T".
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2331
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Wed, 2 Jan 2008 06:26:23 +0000 (06:26 +0000)]
Debian packaging: Remove lintian overrides
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2330
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Wed, 2 Jan 2008 06:25:36 +0000 (06:25 +0000)]
Debian packaging: Tag library and development package with correct section.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2329
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ingvar [Sat, 29 Dec 2007 21:11:20 +0000 (21:11 +0000)]
updates from fedora build
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2328
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Thu, 20 Dec 2007 13:57:31 +0000 (13:57 +0000)]
When writing to a file, fflush() after every line so tail -F will work.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2324
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Thu, 20 Dec 2007 13:35:33 +0000 (13:35 +0000)]
Only look for sendfile() on platforms where we know how to use it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2322
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 20 Dec 2007 11:18:21 +0000 (11:18 +0000)]
Change spec file to work with fedora as well.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2320
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 20 Dec 2007 11:03:58 +0000 (11:03 +0000)]
Add another uploader for the debian package
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2318
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 20 Dec 2007 10:38:06 +0000 (10:38 +0000)]
comment out autogen.sh invocation
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2316
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 20 Dec 2007 09:50:07 +0000 (09:50 +0000)]
Red hat packaging, updated spec file
* Bumped version and release numbers
* Added build dependency for libxslt, for xsltproc
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2314
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 20 Dec 2007 09:43:37 +0000 (09:43 +0000)]
redhat packaging: add version number change perfomed in branches/1.1 to trunk as well
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2313
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ingvar [Wed, 19 Dec 2007 20:29:36 +0000 (20:29 +0000)]
Small changes to README.redhat
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2310
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Tue, 18 Dec 2007 17:19:46 +0000 (17:19 +0000)]
r2285 and r2286 have been merged.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2306
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Tue, 18 Dec 2007 17:02:39 +0000 (17:02 +0000)]
Tweak the panic string, and document how to extract it post-mortem.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2303
d4fa192b -c00b-0410-8231-
f00ffab90ce4
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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