]> err.no Git - varnish/log
varnish
18 years agoAlways use GET and HTTP/1.1 against the backend for fetch
phk [Sat, 22 Jul 2006 16:15:17 +0000 (16:15 +0000)]
Always use GET and HTTP/1.1 against the backend for fetch

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

18 years agoexit after error
phk [Sat, 22 Jul 2006 13:58:31 +0000 (13:58 +0000)]
exit after error

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

18 years agoImplement regexp matching of strings in VCL.
phk [Sat, 22 Jul 2006 12:00:18 +0000 (12:00 +0000)]
Implement regexp matching of strings in VCL.

For now we default to REG_EXTENDED, but it might make sense
to let the user control this flag and the case sensitivity.

Another concern is the stringification of regexps, it may lead
to backslash madness.  Maybe we should define '...' string types
also and do no backslash substitution in those at all.

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

18 years agoChange the acl syntax slightly: the ( ... ) should enclose all of
phk [Sat, 22 Jul 2006 10:41:00 +0000 (10:41 +0000)]
Change the acl syntax slightly:  the ( ... ) should enclose all of
the rule (ie: also !  and /mask if present).

Implement matching for IPv4.

Acl tests are shmlogged as follows (doc candidate):

shmlog tag: VCL_actl

"NO_MATCH $acl"
client did not match access list $acl
"FAIL $acl $rule"
getaddrinfo(3) failed on $rule which had a '!'
"MATCH $acl $rule"
client matched $rule
"NEG_MATCH $acl $rule"
client matched negated (!) $rule

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

18 years agoStore the socket address in the session
phk [Sat, 22 Jul 2006 10:35:39 +0000 (10:35 +0000)]
Store the socket address in the session

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

18 years agoVCL compiler:
phk [Sat, 22 Jul 2006 09:38:09 +0000 (09:38 +0000)]
VCL compiler:
add two sbufs for "init" and "fini" actions.

VCL ACLs:  Change syntax and implementation as follows.

ACL Syntax now works the following way:

acl $name {
! ( "myhost.com" ) ;
"10.0.0.1" /8 ;
}

The '!' means not.  If the address matches the rest of the rule
the address does NOT match the acl and the search terminates here.

Enclosing the string in paranthesis means that the rule will be ignored
if the string cannot be converted to an address (with getaddrinfo).

When a string can not be looked up, and is not enclosed in a
paranthesis, a positive rule (ie: without !) will not match and a
negative rule (with !) will match.

A mask can always be supplied, no matter the style of the string
given, so it is possible to do things like:

{ "fw.ourcompany.dom" / 24 }

Which means "any host on the same /24 subnet as fw.ourcompany.dom".

Unfortunately getaddrinfo() does not return a TTL for the results,
in the future we may want to use some kind of timeout to refresh
the lookups.

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

18 years agoSplit IP/ACL compilation into vcc_acl.c
phk [Sat, 22 Jul 2006 08:02:47 +0000 (08:02 +0000)]
Split IP/ACL compilation into vcc_acl.c

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

18 years agoUnless the user specifies an explicit size, don't use more than 2GB
phk [Fri, 21 Jul 2006 22:12:38 +0000 (22:12 +0000)]
Unless the user specifies an explicit size, don't use more than 2GB
on 32 bit architectures to avoid running out of address room

Make FlexeLint happy.

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

18 years agoMake FlexeLint happier
phk [Fri, 21 Jul 2006 21:57:43 +0000 (21:57 +0000)]
Make FlexeLint happier

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

18 years agoDrop this one now.
phk [Fri, 21 Jul 2006 21:42:00 +0000 (21:42 +0000)]
Drop this one now.

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

18 years agoImplement TTL adjustment from VCL
phk [Fri, 21 Jul 2006 21:28:51 +0000 (21:28 +0000)]
Implement TTL adjustment from VCL

Log in shmem where the TTL came from (doc-candidate):

696613561 RFC 900 1153517009 1153517014 1153517914 900 0
        |         |   |   |          |          |          |   |
        |         |   |   |          |          |          |   age
        |         |   |   |          |          |          max-age
        |         |   |   |          |          Expires: header
        |         |   |   |          Date: header
        |         |   |   "now"
        |         |   TTL relative to "now"
        |         who set the TTL
        xid of object

or

696613561 VCL 20 1153517009
|         |   |  |
|         |   |  "now"
|         |   TTL relative to "now"
|         who set the TTL
        xid of object

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

18 years agoMore VRT work.
phk [Fri, 21 Jul 2006 21:13:43 +0000 (21:13 +0000)]
More VRT work.

Use macros for trivial objects which are just a field in a struct.

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

18 years agoUpdate VRT to minimal functional level again
phk [Fri, 21 Jul 2006 21:01:45 +0000 (21:01 +0000)]
Update VRT to minimal functional level again

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

18 years agoUse const char* for safety
phk [Fri, 21 Jul 2006 20:51:24 +0000 (20:51 +0000)]
Use const char* for safety

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

18 years agoUpdate
phk [Fri, 21 Jul 2006 20:45:13 +0000 (20:45 +0000)]
Update

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

18 years agoThis file is generated.
phk [Fri, 21 Jul 2006 20:44:58 +0000 (20:44 +0000)]
This file is generated.

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

18 years agoAutomate generation of tables and prototypes for the objects which
phk [Fri, 21 Jul 2006 20:43:56 +0000 (20:43 +0000)]
Automate generation of tables and prototypes for the objects which
VCL programs can manipulate.

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

18 years agoMove things over to the correct "VCC" prefix.
phk [Fri, 21 Jul 2006 18:12:56 +0000 (18:12 +0000)]
Move things over to the correct "VCC" prefix.

Split some stuff into separate files while we're at it.

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

18 years agoupdate comment
phk [Fri, 21 Jul 2006 16:25:24 +0000 (16:25 +0000)]
update comment

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

18 years agoProperly log TTL calculation to shmem
phk [Fri, 21 Jul 2006 16:15:58 +0000 (16:15 +0000)]
Properly log TTL calculation to shmem

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

18 years agoFix formatting of responses.
phk [Fri, 21 Jul 2006 16:06:07 +0000 (16:06 +0000)]
Fix formatting of responses.

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

18 years agoLog TTL calculation on the right fd
phk [Fri, 21 Jul 2006 16:05:53 +0000 (16:05 +0000)]
Log TTL calculation on the right fd

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

18 years agoWork on logtailer api a bit:
phk [Fri, 21 Jul 2006 15:25:09 +0000 (15:25 +0000)]
Work on logtailer api a bit:

By default, start at the last entry in shared memory.  To dump the
entire segment from the start, specify '-d' option.

Terminate programs when '-r $file' reaches EOF

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

18 years agoCleanup
phk [Fri, 21 Jul 2006 12:18:01 +0000 (12:18 +0000)]
Cleanup

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

18 years agoMagic check on struct vbe
phk [Fri, 21 Jul 2006 12:08:57 +0000 (12:08 +0000)]
Magic check on struct vbe

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

18 years agoBetter name
phk [Fri, 21 Jul 2006 12:06:36 +0000 (12:06 +0000)]
Better name

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

18 years agoConvert fetch, insert and deliver to use new HTTP header munging code.
phk [Fri, 21 Jul 2006 11:55:17 +0000 (11:55 +0000)]
Convert fetch, insert and deliver to use new HTTP header munging code.

Remove sbuf from workerthread, it is only used in the Error handling
now and it will probably not even survive that in the long run.

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

18 years agoMake pipe use the new http manipulation.
phk [Fri, 21 Jul 2006 10:44:12 +0000 (10:44 +0000)]
Make pipe use the new http manipulation.

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

18 years agoHTTP header munging part (N of M)
phk [Fri, 21 Jul 2006 09:32:09 +0000 (09:32 +0000)]
HTTP header munging part (N of M)

NB: Only pass mode (lightly) tested right now.

Give up on the three element array per header and use a two element struct
instead, it reduces obfuscation and removes risk of pointer fandango.

Introduce #defined filtercontrol in http_headers.h, use them in a new
field.  Only Pass is there for now.

Use the http-workspace for building headers instead of sbuf.

Move uiovec handling to cache_pool.c where it more naturally belongs
and so we can use it on both backends and sessions.

Add http header munging functiosn for copying, printf'ing, filtering and
writing headers.

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

18 years agoRename shmlog tags for headers to RxHeader and TxHeader that's more
phk [Fri, 21 Jul 2006 07:18:40 +0000 (07:18 +0000)]
Rename shmlog tags for headers to RxHeader and TxHeader that's more
logical.

Rename http_Init() to http_Setup() to avoid clash with HTTP_Init().

Remove unused variable

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

18 years agoYet another refinement to the way we store and deal with HTTP headers.
phk [Thu, 20 Jul 2006 22:08:43 +0000 (22:08 +0000)]
Yet another refinement to the way we store and deal with HTTP headers.

Record a triplet of {start, data, end} for all HTTP data items.

This represents a regrettable uglification of the sourcecode, but
most of it compiles out to constants and the runtime benefits will
be worth it.

Generate H_FOO magic strings for all the headers we know about.
These strings have a length as first char and always ends in ':'.

Also genereate H_FOO format strings in VCL compiler.

Mandate (with assert) that header references happen using H_FOO strings.

Make number of allowed HTTP headers a compile time constant (32)
but make the workspace a run-time variable (4096).

Introduce new SHM tag for dumping aborted HTTP protocol requests.

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

18 years agoAdd XXX comment
phk [Thu, 20 Jul 2006 15:10:36 +0000 (15:10 +0000)]
Add XXX comment

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

18 years agoKeep an eye on deathrow
phk [Thu, 20 Jul 2006 14:46:49 +0000 (14:46 +0000)]
Keep an eye on deathrow

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

18 years agoMore asserts
phk [Thu, 20 Jul 2006 14:40:54 +0000 (14:40 +0000)]
More asserts

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

18 years agoWe need to check the TTL here also, if a (sequence of) slow client(s)
phk [Thu, 20 Jul 2006 14:23:59 +0000 (14:23 +0000)]
We need to check the TTL here also, if a (sequence of) slow client(s)
manages to hold the document referenced, the prefetcher may never
get lucky with it and it will linger here much past last sell date.

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

18 years agoOnly reference srcaddr on first request on session
phk [Thu, 20 Jul 2006 13:42:56 +0000 (13:42 +0000)]
Only reference srcaddr on first request on session

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

18 years agoBe more paranoid about srcaddr
phk [Thu, 20 Jul 2006 13:39:47 +0000 (13:39 +0000)]
Be more paranoid about srcaddr

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

18 years agoupd
phk [Thu, 20 Jul 2006 13:33:22 +0000 (13:33 +0000)]
upd

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

18 years agoKeep track of active source addresses
phk [Thu, 20 Jul 2006 13:29:13 +0000 (13:29 +0000)]
Keep track of active source addresses

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

18 years agoAdded varnish / RFC2616 illustrations
ssm [Thu, 20 Jul 2006 12:15:49 +0000 (12:15 +0000)]
Added varnish / RFC2616 illustrations

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

18 years agoAdd -1 option that stops comparison after first field.
phk [Thu, 20 Jul 2006 12:03:10 +0000 (12:03 +0000)]
Add -1 option that stops comparison after first field.

Useful with commands like:

varnishtop -i header -1
varnishtop -i srcaddr -1

where the variable part of the entry is less relevant.

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

18 years agoRemove reference to XSL stylesheet.
des [Thu, 20 Jul 2006 11:17:44 +0000 (11:17 +0000)]
Remove reference to XSL stylesheet.

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

18 years agoFix stylesheet path (botched in previous commit)
des [Thu, 20 Jul 2006 11:16:01 +0000 (11:16 +0000)]
Fix stylesheet path (botched in previous commit)

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

18 years agoAdd missing end tags + whitespace cleanup
des [Thu, 20 Jul 2006 11:15:16 +0000 (11:15 +0000)]
Add missing end tags + whitespace cleanup

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

18 years agoRewrite the "components" part to match reality.
phk [Thu, 20 Jul 2006 10:55:18 +0000 (10:55 +0000)]
Rewrite the "components" part to match reality.

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

18 years agoShow also average since start
phk [Thu, 20 Jul 2006 10:10:24 +0000 (10:10 +0000)]
Show also average since start

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

18 years agoHmm, that was a bad idea.
phk [Thu, 20 Jul 2006 09:58:11 +0000 (09:58 +0000)]
Hmm, that was a bad idea.

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

18 years agoLoop till we have everything.
phk [Thu, 20 Jul 2006 09:42:47 +0000 (09:42 +0000)]
Loop till we have everything.

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

18 years agoImplement "If-Modified-Since" conditional queries
phk [Thu, 20 Jul 2006 09:29:45 +0000 (09:29 +0000)]
Implement "If-Modified-Since" conditional queries

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

18 years agoRemove explicit worker thread arguments.
phk [Thu, 20 Jul 2006 08:29:14 +0000 (08:29 +0000)]
Remove explicit worker thread arguments.

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

18 years agoMove the delivery functions from acceptor to response
phk [Thu, 20 Jul 2006 08:25:53 +0000 (08:25 +0000)]
Move the delivery functions from acceptor to response

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

18 years agoRework the worker thread pool logic slightly, we were leaking
phk [Wed, 19 Jul 2006 21:16:03 +0000 (21:16 +0000)]
Rework the worker thread pool logic slightly, we were leaking
threads before.

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

18 years agoInclude a "start_time" timestamp in the stats and teach varnishstats
phk [Wed, 19 Jul 2006 21:14:41 +0000 (21:14 +0000)]
Include a "start_time" timestamp in the stats and teach varnishstats
to print it in curses mode.

Some polishing and cleanup.

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

18 years agoUse insert_pass in vcl_fetch() so we cache the uncacheability.
phk [Wed, 19 Jul 2006 20:07:16 +0000 (20:07 +0000)]
Use insert_pass in vcl_fetch() so we cache the uncacheability.

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

18 years agoDon't explode on trim's to zero size.
phk [Wed, 19 Jul 2006 20:06:18 +0000 (20:06 +0000)]
Don't explode on trim's to zero size.

Real fix should (maybe) be to callers

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

18 years agoUpdate only once per second.
phk [Wed, 19 Jul 2006 19:49:22 +0000 (19:49 +0000)]
Update only once per second.

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

18 years agoMake sure width and precision arguments to printf %*.*s are ints.
phk [Wed, 19 Jul 2006 19:48:23 +0000 (19:48 +0000)]
Make sure width and precision arguments to printf %*.*s are ints.

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

18 years agoDon't panic on NULL srcaddr, but revisit later when we know the
phk [Wed, 19 Jul 2006 19:47:29 +0000 (19:47 +0000)]
Don't panic on NULL srcaddr, but revisit later when we know the
details.  Is it the Prefetcher ?

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

18 years agoDelete the right list item.
phk [Wed, 19 Jul 2006 19:45:51 +0000 (19:45 +0000)]
Delete the right list item.

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

18 years agoDon't bother determining if we should close if we already have done so.
phk [Wed, 19 Jul 2006 19:45:14 +0000 (19:45 +0000)]
Don't bother determining if we should close if we already have done so.
Also: we may not have valid headers if cache_http.c threw a 400.

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

18 years agoMake sure hp->v is NUL terminated.
phk [Wed, 19 Jul 2006 19:43:39 +0000 (19:43 +0000)]
Make sure hp->v is NUL terminated.

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

18 years agoUse miniobj.h to catch pointer trouble
phk [Wed, 19 Jul 2006 12:37:03 +0000 (12:37 +0000)]
Use miniobj.h to catch pointer trouble

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

18 years agoAdd miniobj.h for debugging
phk [Wed, 19 Jul 2006 12:36:42 +0000 (12:36 +0000)]
Add miniobj.h for debugging

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

18 years agoAvoid the Error path for now.
phk [Wed, 19 Jul 2006 11:53:06 +0000 (11:53 +0000)]
Avoid the Error path for now.

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

18 years agohandle 302 for now.
phk [Wed, 19 Jul 2006 11:11:48 +0000 (11:11 +0000)]
handle 302 for now.

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

18 years agoProperly zero the worker structure when we start a thread.
phk [Wed, 19 Jul 2006 08:33:10 +0000 (08:33 +0000)]
Properly zero the worker structure when we start a thread.

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

18 years agoeliminate debugging
phk [Tue, 18 Jul 2006 13:47:10 +0000 (13:47 +0000)]
eliminate debugging

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

18 years agoDelete binheap root by it's index.
phk [Tue, 18 Jul 2006 13:19:55 +0000 (13:19 +0000)]
Delete binheap root by it's index.

Expect a refcount of one (the one holding the object in the hash)

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

18 years agoFix the Parent calculation
phk [Tue, 18 Jul 2006 13:18:50 +0000 (13:18 +0000)]
Fix the Parent calculation

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

18 years agoSet the index of deleted elements to zero
phk [Tue, 18 Jul 2006 12:46:23 +0000 (12:46 +0000)]
Set the index of deleted elements to zero

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

18 years agoMove the root index from zero to one
phk [Tue, 18 Jul 2006 12:40:17 +0000 (12:40 +0000)]
Move the root index from zero to one

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

18 years agoRemove the deref/unbusy stuff from FetchBody() it's done in central.c
phk [Tue, 18 Jul 2006 12:29:11 +0000 (12:29 +0000)]
Remove the deref/unbusy stuff from FetchBody() it's done in central.c

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

18 years agoAssert that object is busy when we call unbusy
phk [Tue, 18 Jul 2006 12:28:32 +0000 (12:28 +0000)]
Assert that object is busy when we call unbusy

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

18 years agoUse a void * for http_Read()'s buffer
phk [Tue, 18 Jul 2006 12:27:57 +0000 (12:27 +0000)]
Use a void * for http_Read()'s buffer

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

18 years agoBraino this time.
phk [Tue, 18 Jul 2006 10:48:21 +0000 (10:48 +0000)]
Braino this time.

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

18 years agotypo
phk [Tue, 18 Jul 2006 10:45:57 +0000 (10:45 +0000)]
typo

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

18 years agoAdd http_Read() which reads from a socket but soaks up any prefeched
phk [Tue, 18 Jul 2006 10:45:15 +0000 (10:45 +0000)]
Add http_Read() which reads from a socket but soaks up any prefeched
tail first and use it all the places where this logic was explicit
before.

Fix Refcounting on objects when we insert/deliver

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

18 years agoUse bigger buffersizes for pass mode
phk [Tue, 18 Jul 2006 10:32:40 +0000 (10:32 +0000)]
Use bigger buffersizes for pass mode

Terminate the sbuf with the reply headers properly.

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

18 years agoRetire the http_GetReq(), http_GetURL() and http_GetProto() accessor
phk [Tue, 18 Jul 2006 09:02:56 +0000 (09:02 +0000)]
Retire the http_GetReq(), http_GetURL() and http_GetProto() accessor
functions now that struct http is out of the closet.

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

18 years agopolish
phk [Tue, 18 Jul 2006 08:52:07 +0000 (08:52 +0000)]
polish

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

18 years agozero means 'all' to http_GetTail()
phk [Tue, 18 Jul 2006 08:51:42 +0000 (08:51 +0000)]
zero means 'all' to http_GetTail()

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

18 years agouse space to separate host and port in -b
phk [Fri, 14 Jul 2006 13:54:41 +0000 (13:54 +0000)]
use space to separate host and port in -b

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

18 years agoUse space to separate host and port in backend spec.
phk [Fri, 14 Jul 2006 13:52:11 +0000 (13:52 +0000)]
Use space to separate host and port in backend spec.

Polish usage message a bit.

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

18 years agoWhen during a lookup we encounter a busy object, queue the session on
phk [Fri, 14 Jul 2006 13:33:26 +0000 (13:33 +0000)]
When during a lookup we encounter a busy object, queue the session on
the objects waitinglist and disembark the worker thread so it can do
something sensible in the mean time.

This feature is unimportant in normal operation, but crucial to
resource management if a popular URL suddenly takes a long time to
reply from the backend.

Without this bit if semi-nasty code, we would tie up one worker
thread per client while waiting for the backend to come to it's
senses.

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

18 years agoHave the acceptor launch the session into STP_RECV
phk [Fri, 14 Jul 2006 12:47:09 +0000 (12:47 +0000)]
Have the acceptor launch the session into STP_RECV

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

18 years agoUse the fact that we have the worker thread in struct sess now.
phk [Fri, 14 Jul 2006 12:45:56 +0000 (12:45 +0000)]
Use the fact that we have the worker thread in struct sess now.

Move initial and final processing into cnt_recv() and cnt_done()

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

18 years agoHave the states tell us if we are done yet with their return value,
phk [Fri, 14 Jul 2006 12:30:49 +0000 (12:30 +0000)]
Have the states tell us if we are done yet with their return value,
so that we can implement disembarking the worker thread of the object
is busy.

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

18 years agoPut a starttime in shmem so varnishstat can show average rates.
phk [Fri, 14 Jul 2006 12:22:44 +0000 (12:22 +0000)]
Put a starttime in shmem so varnishstat can show average rates.

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

18 years agoFlexelint'ing, found a spurious ';'
phk [Fri, 14 Jul 2006 12:12:46 +0000 (12:12 +0000)]
Flexelint'ing, found a spurious ';'

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

18 years agoMore SHM creation polishing
phk [Fri, 14 Jul 2006 12:05:28 +0000 (12:05 +0000)]
More SHM creation polishing

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

18 years agoBetter and more paranoid SHMEM creation logic
phk [Fri, 14 Jul 2006 11:44:28 +0000 (11:44 +0000)]
Better and more paranoid SHMEM creation logic

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

18 years agopropset Id
phk [Fri, 14 Jul 2006 11:42:29 +0000 (11:42 +0000)]
propset Id

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

18 years agoChange "client" to "srcaddr", it's more descriptive.
phk [Fri, 14 Jul 2006 11:20:10 +0000 (11:20 +0000)]
Change "client" to "srcaddr", it's more descriptive.

Add srcaddr management and start charging bytes to the srcaddr.

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

18 years agoRework the way we do ascii representations of addresses
phk [Fri, 14 Jul 2006 10:34:06 +0000 (10:34 +0000)]
Rework the way we do ascii representations of addresses

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

18 years agoMove session management to new file (cache_session, SES prefix) in
phk [Fri, 14 Jul 2006 10:16:27 +0000 (10:16 +0000)]
Move session management to new file (cache_session, SES prefix) in
preparation of adding client tracking.

Move the iovec's from the session to the worker and give the session
a pointer to the worker so we can avoid passing it around as argument.

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

18 years agoMore Flexelinting
phk [Wed, 12 Jul 2006 23:30:49 +0000 (23:30 +0000)]
More Flexelinting

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

18 years agoMore flexelinting.
phk [Wed, 12 Jul 2006 22:52:08 +0000 (22:52 +0000)]
More flexelinting.

No bugs so far.

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

18 years agoFlexelint harder.
phk [Wed, 12 Jul 2006 22:07:00 +0000 (22:07 +0000)]
Flexelint harder.

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

18 years agoGive this file a flexelinting
phk [Wed, 12 Jul 2006 22:01:43 +0000 (22:01 +0000)]
Give this file a flexelinting

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

18 years agoImprove the INCOMPL() macro.
phk [Wed, 12 Jul 2006 22:01:15 +0000 (22:01 +0000)]
Improve the INCOMPL() macro.

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