]> err.no Git - varnish/log
varnish
18 years agoMore miniobj checks
phk [Tue, 1 Aug 2006 16:42:37 +0000 (16:42 +0000)]
More miniobj checks

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

18 years agomore miniobj checks
phk [Tue, 1 Aug 2006 16:26:10 +0000 (16:26 +0000)]
more miniobj checks

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

18 years agoFlinting.
phk [Tue, 1 Aug 2006 15:09:20 +0000 (15:09 +0000)]
Flinting.

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

18 years agoMake 32bit limitation work better.
phk [Tue, 1 Aug 2006 15:08:54 +0000 (15:08 +0000)]
Make 32bit limitation work better.

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

18 years agoFixx off by one error.
phk [Tue, 1 Aug 2006 15:08:36 +0000 (15:08 +0000)]
Fixx off by one error.

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

18 years agoAdd miniobj checks om SMF and STORAGE
phk [Tue, 1 Aug 2006 14:53:29 +0000 (14:53 +0000)]
Add miniobj checks om SMF and STORAGE

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

18 years agoThis is getting too longhaired: Give backend connections another
phk [Tue, 1 Aug 2006 12:38:26 +0000 (12:38 +0000)]
This is getting too longhaired:  Give backend connections another
http header which we can use to build the object headers in.

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

18 years agoExperiment: don't use req's workspace to build object http header.
phk [Tue, 1 Aug 2006 12:04:56 +0000 (12:04 +0000)]
Experiment:  don't use req's workspace to build object http header.

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

18 years agoRecord timestamp when we have received completed HTTP request header,
phk [Tue, 1 Aug 2006 09:39:52 +0000 (09:39 +0000)]
Record timestamp when we have received completed HTTP request header,
and define this as the "start of request timestamp".

Define "end of request timestamp" as when we are ready to transmit
HTTP header back.

SHMlog the start and difference between start and stop with ReqServTime
tag.

Keep track of idle sessions using CLOCK_MONOTONIC to avoid trouble
here should our clock get stepped.

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

18 years agoAdded some more toying with the data. All is still a mess, and I am not sure of struc...
andersb [Mon, 31 Jul 2006 22:21:02 +0000 (22:21 +0000)]
Added some more toying with the data. All is still a mess, and I am not sure of structure yet. PHK is also doing changes in areas that will be needed.

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

18 years agoAlways NUL terminate shmlog entries.
phk [Mon, 31 Jul 2006 22:09:42 +0000 (22:09 +0000)]
Always NUL terminate shmlog entries.

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

18 years agoCreate three groups of seven SHMlog tags:
phk [Mon, 31 Jul 2006 21:49:29 +0000 (21:49 +0000)]
Create three groups of seven SHMlog tags:

{Rx,Tx,Obj}{Request,Response,Status,URL,Protocol,Header,LostHeader}

And log http header munching accordingly.

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

18 years agoRemove unused variable
phk [Mon, 31 Jul 2006 21:46:32 +0000 (21:46 +0000)]
Remove unused variable

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

18 years agoaddr might be NULL if we are called from the prefetcher.
phk [Mon, 31 Jul 2006 21:37:10 +0000 (21:37 +0000)]
addr might be NULL if we are called from the prefetcher.

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

18 years agoAdd http_ClrHeader() and cure an unintended bug-oid its use exposes:
phk [Mon, 31 Jul 2006 21:04:43 +0000 (21:04 +0000)]
Add http_ClrHeader() and cure an unintended bug-oid its use exposes:
we checked if the request is a GET long after we should have.

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

18 years agoAdd a http_SetResp() function for constructing HTTP responses (like 304).
phk [Mon, 31 Jul 2006 20:38:46 +0000 (20:38 +0000)]
Add a http_SetResp() function for constructing HTTP responses (like 304).

Eliminate the header index from http_SetHeader() which is no unused.

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

18 years agoLog the headers we store in the object under ObjHeader so that
phk [Mon, 31 Jul 2006 20:27:02 +0000 (20:27 +0000)]
Log the headers we store in the object under ObjHeader so that
we don't get two confusing batches of TxHeader in the sessions logentries.

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

18 years agoFix the dot-graph
phk [Mon, 31 Jul 2006 19:18:26 +0000 (19:18 +0000)]
Fix the dot-graph

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

18 years agoInitial commit of real structure. This code will print the User-Agent.
andersb [Mon, 31 Jul 2006 14:50:36 +0000 (14:50 +0000)]
Initial commit of real structure. This code will print the User-Agent.

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

18 years agoIntroduce http_SetHeader() for setting a http header to a const string,
phk [Mon, 31 Jul 2006 07:26:25 +0000 (07:26 +0000)]
Introduce http_SetHeader() for setting a http header to a const string,
no need to waste time printf'ing in this case, and no need to waste workspace.

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

18 years agoDon't fill more than half the workspace with received data, we need to
phk [Mon, 31 Jul 2006 07:13:45 +0000 (07:13 +0000)]
Don't fill more than half the workspace with received data, we need to
have space for composing the reply as well.

Without this fix, the entire workspace could be filled with pipelined
requests and we would have no space to compose the reply.

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

18 years agoClone varnishncsa off of varnishlog. Anders will hack on it to produce
des [Mon, 31 Jul 2006 06:36:56 +0000 (06:36 +0000)]
Clone varnishncsa off of varnishlog.  Anders will hack on it to produce
NCSA-style (common / combined) logs.

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

18 years agoUnbreak build.
des [Mon, 31 Jul 2006 06:24:51 +0000 (06:24 +0000)]
Unbreak build.

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

18 years ago"HEAD" has 4 characters.
phk [Fri, 28 Jul 2006 13:41:20 +0000 (13:41 +0000)]
"HEAD" has 4 characters.

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

18 years agoremove this file (again)
phk [Mon, 24 Jul 2006 10:13:29 +0000 (10:13 +0000)]
remove this file (again)

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

18 years agoreorg a little bit.
phk [Sat, 22 Jul 2006 22:01:04 +0000 (22:01 +0000)]
reorg a little bit.

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

18 years agoEliminate redundant args from stevedore->send()
phk [Sat, 22 Jul 2006 21:20:08 +0000 (21:20 +0000)]
Eliminate redundant args from stevedore->send()

Have WRK_Write() and friends return number of bytes (we can't use
WRK_Flush() as that may act on both header and body).

Collect more stats.

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

18 years agoAdd per address, per session and total statistics.
phk [Sat, 22 Jul 2006 20:57:02 +0000 (20:57 +0000)]
Add per address, per session and total statistics.

We (will) collect data in unlocked per workerthread accumulators
and whenever the workerthread leaves the session, we charge the
bill to the srcaddr (issuing a StatAddr shmrecord), to the session
and to the global counters in the stats struct.

When sessions die we issue a StatSess shmrecord.

StatAddr and StatSess has the same format:
address
port (always zero for StatAddr)
duration (seconds)
#sessions
#requests
#pipe
#pass
#fetch
#hdrbytes
#bodybytes

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

18 years agoMake sure there always is a Host: header in fetch requests.
phk [Sat, 22 Jul 2006 16:55:17 +0000 (16:55 +0000)]
Make sure there always is a Host: header in fetch requests.

We fill it in with backend.hostname, but this may not be optimal
(direct IP# etc etc) so VCL should be able to override it.

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

18 years agoAction pass from vcl_hit() needs to go to STP_PASS
phk [Sat, 22 Jul 2006 16:26:45 +0000 (16:26 +0000)]
Action pass from vcl_hit() needs to go to STP_PASS

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

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