]> err.no Git - varnish/log
varnish
18 years agoretry backend open, log diagnostics
phk [Tue, 4 Jul 2006 14:19:12 +0000 (14:19 +0000)]
retry backend open, log diagnostics

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

18 years agoload VCL earlier
phk [Tue, 4 Jul 2006 14:18:34 +0000 (14:18 +0000)]
load VCL earlier

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

18 years agoLock with a mutex
phk [Tue, 4 Jul 2006 14:18:02 +0000 (14:18 +0000)]
Lock with a mutex

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

18 years agoShorter sleeps: 1s -> 50msec
phk [Tue, 4 Jul 2006 13:45:16 +0000 (13:45 +0000)]
Shorter sleeps:  1s -> 50msec

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

18 years agoFix off by one error during wraparound.
phk [Tue, 4 Jul 2006 13:44:07 +0000 (13:44 +0000)]
Fix off by one error during wraparound.

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

18 years agoCorrect the Connection header, and add ability to perform HEAD requests.
des [Tue, 4 Jul 2006 13:11:39 +0000 (13:11 +0000)]
Correct the Connection header, and add ability to perform HEAD requests.

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

18 years agoAdd some comments.
des [Tue, 4 Jul 2006 12:03:13 +0000 (12:03 +0000)]
Add some comments.

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

18 years agoStuff we use for testing.
des [Tue, 4 Jul 2006 12:01:44 +0000 (12:01 +0000)]
Stuff we use for testing.

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

18 years agoClose non HTTP/1.1 request connections
phk [Tue, 4 Jul 2006 09:28:21 +0000 (09:28 +0000)]
Close non HTTP/1.1 request connections

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

18 years agoAdd missing '%'
phk [Tue, 4 Jul 2006 09:21:33 +0000 (09:21 +0000)]
Add missing '%'

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

18 years agoMy workaround for the missing OFF_T_MAX definition was not safe,
phk [Mon, 3 Jul 2006 19:45:12 +0000 (19:45 +0000)]
My workaround for the missing OFF_T_MAX definition was not safe,
use a hardcoded "1<<30" which is.

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

18 years agoI have grumbled about the evilness of "current_base" before, and this just
phk [Mon, 3 Jul 2006 19:35:05 +0000 (19:35 +0000)]
I have grumbled about the evilness of "current_base" before, and this just
proves the point:  If two threads call event_init() at the same time,
they will both stomp on the same memory via current_base, and in all
likelyhood, neither of them will manage to get the job done properly.

Instead work on a local variable and don't assign to current_base
until the setup is complete.

This should be submitted to Niels Provos

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

18 years agoHandle IPv6 address -> string conversion too
phk [Mon, 3 Jul 2006 18:35:39 +0000 (18:35 +0000)]
Handle IPv6 address -> string conversion too

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

18 years agoClose race condition
phk [Mon, 3 Jul 2006 18:03:44 +0000 (18:03 +0000)]
Close race condition

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

18 years agoBetter arg checking
phk [Mon, 3 Jul 2006 17:59:13 +0000 (17:59 +0000)]
Better arg checking

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

18 years agomore asserts
phk [Mon, 3 Jul 2006 15:01:14 +0000 (15:01 +0000)]
more asserts

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

18 years agoavoid const poison
phk [Mon, 3 Jul 2006 14:39:40 +0000 (14:39 +0000)]
avoid const poison

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

18 years agoInclude pthread.h
phk [Mon, 3 Jul 2006 14:39:02 +0000 (14:39 +0000)]
Include pthread.h

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

18 years agos/unsigned/size_t/
phk [Mon, 3 Jul 2006 14:37:51 +0000 (14:37 +0000)]
s/unsigned/size_t/

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

18 years agos/init/start/
phk [Mon, 3 Jul 2006 14:36:03 +0000 (14:36 +0000)]
s/init/start/

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

18 years agoAdd another hash-method with better real-world survival chances: A classic
phk [Mon, 3 Jul 2006 12:41:14 +0000 (12:41 +0000)]
Add another hash-method with better real-world survival chances: A classic
bucketed hash table of lists.  Hash is MD5.  Number of buckets and number
of mutexes can be configured at command line.

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

18 years agoReplace --enable-wall and --enable-pedantic with --enable-developer-warnings,
des [Mon, 3 Jul 2006 08:30:33 +0000 (08:30 +0000)]
Replace --enable-wall and --enable-pedantic with --enable-developer-warnings,
which is roughly equivalent to FreeBSD's WARNS level 5 or 6.

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

18 years agoMark more headers as not end-to-end
phk [Sat, 1 Jul 2006 05:44:04 +0000 (05:44 +0000)]
Mark more headers as not end-to-end

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

18 years agoForgot to add shmlog.c (reminded by des@)
phk [Fri, 30 Jun 2006 20:22:58 +0000 (20:22 +0000)]
Forgot to add shmlog.c (reminded by des@)

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

18 years agoAdd TAILQ_FOREACH_SAFE()
phk [Fri, 30 Jun 2006 20:21:15 +0000 (20:21 +0000)]
Add TAILQ_FOREACH_SAFE()

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

18 years agomove all policy to rfc2616.c
phk [Fri, 30 Jun 2006 20:17:54 +0000 (20:17 +0000)]
move all policy to rfc2616.c

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

18 years agoConsistently use our own copy of queue.h.
des [Fri, 30 Jun 2006 13:44:09 +0000 (13:44 +0000)]
Consistently use our own copy of queue.h.

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

18 years agoFix object length double accounting in chunked fetch
phk [Fri, 30 Jun 2006 11:20:10 +0000 (11:20 +0000)]
Fix object length double accounting in chunked fetch

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

18 years agoDelete compiled VCL file after we tried to load it.
phk [Fri, 30 Jun 2006 09:14:51 +0000 (09:14 +0000)]
Delete compiled VCL file after we tried to load it.

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

18 years agoLog objects banned to shmlog
phk [Thu, 29 Jun 2006 19:19:18 +0000 (19:19 +0000)]
Log objects banned to shmlog

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

18 years agoTrack objects heap-position
phk [Thu, 29 Jun 2006 19:06:44 +0000 (19:06 +0000)]
Track objects heap-position

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

18 years agoAdd the ability to instantly ban/purge all cached objects matching
phk [Thu, 29 Jun 2006 17:09:24 +0000 (17:09 +0000)]
Add the ability to instantly ban/purge all cached objects matching
a given regexp.

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

18 years agoImprove shm-logging of VCL activity
phk [Thu, 29 Jun 2006 15:14:15 +0000 (15:14 +0000)]
Improve shm-logging of VCL activity

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

18 years agoTag objects with their origin session xid and log it when we clean up.
phk [Thu, 29 Jun 2006 14:37:15 +0000 (14:37 +0000)]
Tag objects with their origin session xid and log it when we clean up.

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

18 years agoAdd a unique transaction-ID to each request, and register it in the
phk [Thu, 29 Jun 2006 13:04:55 +0000 (13:04 +0000)]
Add a unique transaction-ID to each request, and register it in the
shmlog so we can match backend transactions with client transactions.

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

18 years agoConvince flexelint that we know what we do with some asserts
phk [Wed, 28 Jun 2006 21:38:20 +0000 (21:38 +0000)]
Convince flexelint that we know what we do with some asserts

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

18 years agoPut a mutex around the shmlog writes, I've seen my first race.
phk [Wed, 28 Jun 2006 21:33:06 +0000 (21:33 +0000)]
Put a mutex around the shmlog writes, I've seen my first race.

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

18 years agoAdd a -o argument which sorts the log into transactions before output,
phk [Wed, 28 Jun 2006 21:18:00 +0000 (21:18 +0000)]
Add a -o argument which sorts the log into transactions before output,
this is a fair bit easier to chew through than the raw log (the default)

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

18 years agoUse shmlog api from libvarnishapi
phk [Wed, 28 Jun 2006 21:03:47 +0000 (21:03 +0000)]
Use shmlog api from libvarnishapi

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

18 years agoUse SHMLOG api in libvarnishapi
phk [Wed, 28 Jun 2006 20:58:36 +0000 (20:58 +0000)]
Use SHMLOG api in libvarnishapi

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

18 years agoAdd SHMLOG opening and walking functions to libvarnishapi
phk [Wed, 28 Jun 2006 20:58:03 +0000 (20:58 +0000)]
Add SHMLOG opening and walking functions to libvarnishapi

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

18 years agoBe more consistent about which headers we send back.
phk [Wed, 28 Jun 2006 17:46:04 +0000 (17:46 +0000)]
Be more consistent about which headers we send back.

Start 5 threads in the worker pool.

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

18 years agoConstruct our own Content-length header, no matter which of the
phk [Wed, 28 Jun 2006 16:59:07 +0000 (16:59 +0000)]
Construct our own Content-length header, no matter which of the
three (straight, chunked, eof) modes we used to fetch the object.

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

18 years agoDon't finish the sbuf in mode 3
phk [Wed, 28 Jun 2006 16:58:21 +0000 (16:58 +0000)]
Don't finish the sbuf in mode 3

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

18 years agoAssert that the lengths of the storage for the object add up.
phk [Wed, 28 Jun 2006 16:57:50 +0000 (16:57 +0000)]
Assert that the lengths of the storage for the object add up.

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

18 years agoDon't pass Content-Lenght through, we build it ourselves
phk [Wed, 28 Jun 2006 16:57:07 +0000 (16:57 +0000)]
Don't pass Content-Lenght through, we build it ourselves

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

18 years agoPass fd to shmemlog
phk [Wed, 28 Jun 2006 16:20:14 +0000 (16:20 +0000)]
Pass fd to shmemlog

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

18 years agoadd tag for generated headers
phk [Wed, 28 Jun 2006 16:19:21 +0000 (16:19 +0000)]
add tag for generated headers

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

18 years agoDon't pass If-* headers to backend
phk [Wed, 28 Jun 2006 16:19:08 +0000 (16:19 +0000)]
Don't pass If-* headers to backend

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

18 years agoApply correct fd in Shmemlog
phk [Wed, 28 Jun 2006 16:14:19 +0000 (16:14 +0000)]
Apply correct fd in Shmemlog

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

18 years agoFix buglets, include test-driver.
phk [Wed, 28 Jun 2006 16:04:33 +0000 (16:04 +0000)]
Fix buglets, include test-driver.

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

18 years agoGive varnishstat a "-c" option to use curses to continously refresh
phk [Wed, 28 Jun 2006 11:29:36 +0000 (11:29 +0000)]
Give varnishstat a "-c" option to use curses to continously refresh

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

18 years agoAdd varnishstat program
phk [Wed, 28 Jun 2006 11:21:06 +0000 (11:21 +0000)]
Add varnishstat program

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

18 years ago304's don't have a body
phk [Wed, 28 Jun 2006 10:31:29 +0000 (10:31 +0000)]
304's don't have a body

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

18 years agoImplement ->trim()
phk [Wed, 28 Jun 2006 10:30:57 +0000 (10:30 +0000)]
Implement ->trim()

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

18 years agoMore stats counters
phk [Wed, 28 Jun 2006 09:39:25 +0000 (09:39 +0000)]
More stats counters

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

18 years agoAdd statistics counter support.
phk [Wed, 28 Jun 2006 09:21:15 +0000 (09:21 +0000)]
Add statistics counter support.

stat_field.h defines the counter fields with name, type, (printf)format
and description.

stats.h defines a structure with these fields.

shmlog.h makes the structure  part of the shared memory logs header.

Implent the "stats" CLI word in the management process.

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

18 years agoCall VCL to decide discard/prefetch for near-expiry objects.
phk [Mon, 26 Jun 2006 19:25:09 +0000 (19:25 +0000)]
Call VCL to decide discard/prefetch for near-expiry objects.

Put discard objects on deathrow where they will be culled from
in sequence.

(prefetch not implemented yet)

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

18 years agoA temporary hack to deal with very old Date: headers until we figure
phk [Mon, 26 Jun 2006 19:24:03 +0000 (19:24 +0000)]
A temporary hack to deal with very old Date: headers until we figure
out what's going on.

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

18 years agoImplement HTTP/1.0 style fetching.
phk [Mon, 26 Jun 2006 19:23:24 +0000 (19:23 +0000)]
Implement HTTP/1.0 style fetching.

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

18 years agoAnother little tweak
phk [Mon, 26 Jun 2006 17:06:50 +0000 (17:06 +0000)]
Another little tweak

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

18 years agoDump numeric handling also, until we figure out trouble.
phk [Mon, 26 Jun 2006 16:31:32 +0000 (16:31 +0000)]
Dump numeric handling also, until we figure out trouble.

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

18 years agotypo
phk [Mon, 26 Jun 2006 16:30:56 +0000 (16:30 +0000)]
typo

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

18 years agoMake this work again: record the stevedore in the storage object.
phk [Mon, 26 Jun 2006 16:19:14 +0000 (16:19 +0000)]
Make this work again: record the stevedore in the storage object.

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

18 years agoStart releasing objects when they expire
phk [Mon, 26 Jun 2006 14:33:49 +0000 (14:33 +0000)]
Start releasing objects when they expire

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

18 years agoMove a bit more responsibility into the hash-slinger to get a cleaner
phk [Mon, 26 Jun 2006 14:00:40 +0000 (14:00 +0000)]
Move a bit more responsibility into the hash-slinger to get a cleaner
interface.

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

18 years agoNow that we approach the time where objects have to be destroyed again,
phk [Mon, 26 Jun 2006 08:58:08 +0000 (08:58 +0000)]
Now that we approach the time where objects have to be destroyed again,
we need to move the data structures into the right shape.

Push hashing into cache_hash.c

Add objhead structure to hold the various hits for "Vary:" headers.

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

18 years agoA little bit more work on the expiry/prefetch thing.
phk [Sat, 24 Jun 2006 22:11:55 +0000 (22:11 +0000)]
A little bit more work on the expiry/prefetch thing.

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

18 years agoUse ttl=0 as a "invalid TTL" flag.
phk [Sat, 24 Jun 2006 21:54:54 +0000 (21:54 +0000)]
Use ttl=0 as a "invalid TTL" flag.

Mark objects with ttl=0 uncachable.

Add cacheable objects to the expiry heap

Start an expiry thread which polls the root element once per second

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

18 years agoTruncate TTLs in the past to now.
phk [Sat, 24 Jun 2006 21:42:27 +0000 (21:42 +0000)]
Truncate TTLs in the past to now.

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

18 years agoAutogenerate prototypes for method calling functions
phk [Sat, 24 Jun 2006 21:09:07 +0000 (21:09 +0000)]
Autogenerate prototypes for method calling functions

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

18 years agoAdd a "timeout" method to VCL, it can return "fetch" or "discard".
phk [Sat, 24 Jun 2006 21:07:18 +0000 (21:07 +0000)]
Add a "timeout" method to VCL, it can return "fetch" or "discard".

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

18 years agoAdd a token type "METHOD", we use it for reference counting.
phk [Sat, 24 Jun 2006 20:50:17 +0000 (20:50 +0000)]
Add a token type "METHOD", we use it for reference counting.

Add a reference to the first backend {} we encounter, it is the default.
Add a reference to all backends assigned explicitly.
Add a reference to all methods.

Enable reference check, complain if: backend, function or acl is defined
but not used, or used but not defined.

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

18 years agoCollapse multiline Fc and Fh calls where they fit
phk [Sat, 24 Jun 2006 20:12:26 +0000 (20:12 +0000)]
Collapse multiline Fc and Fh calls where they fit

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

18 years agoMore printf sanitation: Create to convenience functions for output to the
phk [Sat, 24 Jun 2006 20:09:07 +0000 (20:09 +0000)]
More printf sanitation:  Create to convenience functions for output to the
fh and fc sbufs.

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

18 years agoCave in and use printf format extensions for printing tokens.
phk [Sat, 24 Jun 2006 19:50:56 +0000 (19:50 +0000)]
Cave in and use printf format extensions for printing tokens.
Both Linux and FreeBSD supports them anyway.

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

18 years agoAdd more shmemlog tags:
phk [Sat, 24 Jun 2006 19:41:55 +0000 (19:41 +0000)]
Add more shmemlog tags:
one for each VCL method to record the return
one for errors
one for linking a client session to a backend connection
Use them sensibly.
Put VCL name of backend into struct backend to improve log messages

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

18 years agoImprove the VCL compiler in various ways:
phk [Thu, 22 Jun 2006 16:17:10 +0000 (16:17 +0000)]
Improve the VCL compiler in various ways:

Generate the methods and their legal returns with the tcl script.

Add consistency checks to make sure methods don't use illegal returns,
and also check called subrourtines.

Add consistency check to complain about recursive subroutine calls.

Add consistency check to complain about unused or undefined subroutines.

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

18 years agoAdd (empty) source file for expiry/pretech code
phk [Wed, 21 Jun 2006 10:28:26 +0000 (10:28 +0000)]
Add (empty) source file for expiry/pretech code

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

18 years agoStart to respect TTL
phk [Wed, 21 Jun 2006 10:21:14 +0000 (10:21 +0000)]
Start to respect TTL

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

18 years agoAdd "-t default_ttl" option. 120 seconds by default.
phk [Wed, 21 Jun 2006 10:13:53 +0000 (10:13 +0000)]
Add "-t default_ttl" option.  120 seconds by default.

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

18 years agoQuench some debugging
phk [Wed, 21 Jun 2006 09:58:06 +0000 (09:58 +0000)]
Quench some debugging

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

18 years agoAdd a binary heap implementation for keeping track of objects expiry time.
phk [Wed, 21 Jun 2006 08:09:02 +0000 (08:09 +0000)]
Add a binary heap implementation for keeping track of objects expiry time.

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

18 years agotypo
phk [Tue, 20 Jun 2006 19:49:28 +0000 (19:49 +0000)]
typo

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

18 years agoFlexeLint files
phk [Tue, 20 Jun 2006 19:38:04 +0000 (19:38 +0000)]
FlexeLint files

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

18 years agoFlexeLint cleanups
phk [Tue, 20 Jun 2006 19:37:46 +0000 (19:37 +0000)]
FlexeLint cleanups

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

18 years agoPolish things to silence FlexeLint a bit
phk [Tue, 20 Jun 2006 19:31:46 +0000 (19:31 +0000)]
Polish things to silence FlexeLint a bit

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

18 years agoRename vcl_lang.h to vcl.h and include practically nowhere.
phk [Tue, 20 Jun 2006 11:39:20 +0000 (11:39 +0000)]
Rename vcl_lang.h to vcl.h and include practically nowhere.

Remove #include bogohandling in vcl_gen_fixed_token.tcl

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

18 years agoAt the expense of some complexity and a small runtime overhead,
phk [Tue, 20 Jun 2006 10:31:50 +0000 (10:31 +0000)]
At the expense of some complexity and a small runtime overhead,
isolate the compiled code from the internal structures of the cache
process through of VRT functions.

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

18 years agoWork towards making struct sess opaque to the generated code.
phk [Tue, 20 Jun 2006 09:41:43 +0000 (09:41 +0000)]
Work towards making struct sess opaque to the generated code.

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

18 years agoRename the VCL compilers public functions to VCC prefix
phk [Tue, 20 Jun 2006 09:28:00 +0000 (09:28 +0000)]
Rename the VCL compilers public functions to VCC prefix

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

18 years agoGet rid of VCL_FARGS and VCL_PASS_ARGS macros.
phk [Tue, 20 Jun 2006 09:25:21 +0000 (09:25 +0000)]
Get rid of VCL_FARGS and VCL_PASS_ARGS macros.

Generate VGC prefixes instead of VCL.

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

18 years agoStart putting some structure in the sources relating to VCL handling:
phk [Tue, 20 Jun 2006 09:15:39 +0000 (09:15 +0000)]
Start putting some structure in the sources relating to VCL handling:

Split the runtime support for compiled varnish programs out and give it the
prefix "VRT".

Start using the prefix "VGC" for generated code.

Prefix "VCC" will be for the compiler and "VCL" for calling the compiled and
loaded functions.

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

18 years agoOutput line+pos for counts.
phk [Sun, 18 Jun 2006 10:28:11 +0000 (10:28 +0000)]
Output line+pos for counts.

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

18 years agoInsert a count-point after each conditional.
phk [Sun, 18 Jun 2006 10:19:54 +0000 (10:19 +0000)]
Insert a count-point after each conditional.

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

18 years agoGet the sense of string compares right.
phk [Sun, 18 Jun 2006 10:16:38 +0000 (10:16 +0000)]
Get the sense of string compares right.

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

18 years agodebug printf for max-age
phk [Sun, 18 Jun 2006 10:12:38 +0000 (10:12 +0000)]
debug printf for max-age

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

18 years agoImplement req.request properly
phk [Sun, 18 Jun 2006 10:10:45 +0000 (10:10 +0000)]
Implement req.request properly

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

18 years agoPass if we spot an Authenticate or Cookie header
phk [Sun, 18 Jun 2006 10:04:09 +0000 (10:04 +0000)]
Pass if we spot an Authenticate or Cookie header

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

18 years agoAdd VCL function for getting HTTP header
phk [Sun, 18 Jun 2006 10:03:43 +0000 (10:03 +0000)]
Add VCL function for getting HTTP header

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