From phk at varnish-cache.org Wed Jun 1 09:45:37 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 01 Jun 2011 11:45:37 +0200 Subject: [master] c117268 Update copyright notices to reflect development and copyright assignment from Redpill Linpro AS to Varnish Software AS Message-ID: commit c117268c9e1008ee3fd0e62e8074ece08dbb81bc Author: Poul-Henning Kamp Date: Wed Jun 1 09:44:58 2011 +0000 Update copyright notices to reflect development and copyright assignment from Redpill Linpro AS to Varnish Software AS diff --git a/LICENSE b/LICENSE index 45d8bce..a6cf987 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006-2009 Linpro AS +Copyright (c) 2006-2011 Varnish Software AS All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 22717de..e3f97a3 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Cecilie Fritzvold diff --git a/bin/varnishd/acct_fields.h b/bin/varnishd/acct_fields.h index 35565ab..154f106 100644 --- a/bin/varnishd/acct_fields.h +++ b/bin/varnishd/acct_fields.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2008 Verdens Gang AS - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 9f071a2..f3558ff 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c index 64e3937..f11ae54 100644 --- a/bin/varnishd/cache_acceptor.c +++ b/bin/varnishd/cache_acceptor.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_backend.c b/bin/varnishd/cache_backend.c index 819aac7..8c13112 100644 --- a/bin/varnishd/cache_backend.c +++ b/bin/varnishd/cache_backend.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_backend.h b/bin/varnishd/cache_backend.h index 69082d0..cb707ba 100644 --- a/bin/varnishd/cache_backend.h +++ b/bin/varnishd/cache_backend.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_backend_cfg.c b/bin/varnishd/cache_backend_cfg.c index 68ffcdb..e6c935c 100644 --- a/bin/varnishd/cache_backend_cfg.c +++ b/bin/varnishd/cache_backend_cfg.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c index d6de0fe..d1acf2a 100644 --- a/bin/varnishd/cache_backend_poll.c +++ b/bin/varnishd/cache_backend_poll.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_backend_poll.h b/bin/varnishd/cache_backend_poll.h index 2612916..a9ee3a3 100644 --- a/bin/varnishd/cache_backend_poll.h +++ b/bin/varnishd/cache_backend_poll.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index 28a36cd..c6cf637 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index e2fb980..4375344 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c index 7ef1bb3..915f269 100644 --- a/bin/varnishd/cache_cli.c +++ b/bin/varnishd/cache_cli.c @@ -1,7 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS - * Copyright (c) 2011 Varnish Software AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_dir.c b/bin/varnishd/cache_dir.c index 5ec4e11..2463aa8 100644 --- a/bin/varnishd/cache_dir.c +++ b/bin/varnishd/cache_dir.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_dir_dns.c b/bin/varnishd/cache_dir_dns.c index 244dd2b..d3635a9 100644 --- a/bin/varnishd/cache_dir_dns.c +++ b/bin/varnishd/cache_dir_dns.c @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2009 Redpill Linpro AS - * Copyright (c) 2010 Varnish Software AS + * Copyright (c) 2009-2010 Varnish Software AS * All rights reserved. * * Author: Kristian Lyngstol diff --git a/bin/varnishd/cache_dir_random.c b/bin/varnishd/cache_dir_random.c index eb415b9..f85d905 100644 --- a/bin/varnishd/cache_dir_random.c +++ b/bin/varnishd/cache_dir_random.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_dir_round_robin.c b/bin/varnishd/cache_dir_round_robin.c index 70cac97..2a6009a 100644 --- a/bin/varnishd/cache_dir_round_robin.c +++ b/bin/varnishd/cache_dir_round_robin.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2010 Varnish Software AS * All rights reserved. * * Author: Petter Knudsen diff --git a/bin/varnishd/cache_expire.c b/bin/varnishd/cache_expire.c index 4a4255f..c0e79cc 100644 --- a/bin/varnishd/cache_expire.c +++ b/bin/varnishd/cache_expire.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c index 1cc9dc2..1063c6b 100644 --- a/bin/varnishd/cache_fetch.c +++ b/bin/varnishd/cache_fetch.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 98ec9b0..2a6dcc5 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_http.c b/bin/varnishd/cache_http.c index 40237e5..8df780a 100644 --- a/bin/varnishd/cache_http.c +++ b/bin/varnishd/cache_http.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_httpconn.c b/bin/varnishd/cache_httpconn.c index 514aa3d..3840ed6 100644 --- a/bin/varnishd/cache_httpconn.c +++ b/bin/varnishd/cache_httpconn.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_lck.c b/bin/varnishd/cache_lck.c index 6fb35c4..3e0c640 100644 --- a/bin/varnishd/cache_lck.c +++ b/bin/varnishd/cache_lck.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_main.c b/bin/varnishd/cache_main.c index afd8265..f03604d 100644 --- a/bin/varnishd/cache_main.c +++ b/bin/varnishd/cache_main.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c index fc24607..c443b67 100644 --- a/bin/varnishd/cache_panic.c +++ b/bin/varnishd/cache_panic.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/bin/varnishd/cache_pipe.c b/bin/varnishd/cache_pipe.c index 2f8c91c..0175937 100644 --- a/bin/varnishd/cache_pipe.c +++ b/bin/varnishd/cache_pipe.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c index 9a66f7b..603ba83 100644 --- a/bin/varnishd/cache_pool.c +++ b/bin/varnishd/cache_pool.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 16993f5..407233b 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_session.c b/bin/varnishd/cache_session.c index fa478a6..87e05c7 100644 --- a/bin/varnishd/cache_session.c +++ b/bin/varnishd/cache_session.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_shmlog.c b/bin/varnishd/cache_shmlog.c index b9f9dc8..e0b332d 100644 --- a/bin/varnishd/cache_shmlog.c +++ b/bin/varnishd/cache_shmlog.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 034175b..1300a20 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vcl.c b/bin/varnishd/cache_vcl.c index 7777304..444006d 100644 --- a/bin/varnishd/cache_vcl.c +++ b/bin/varnishd/cache_vcl.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vrt.c b/bin/varnishd/cache_vrt.c index 293b072..65b7522 100644 --- a/bin/varnishd/cache_vrt.c +++ b/bin/varnishd/cache_vrt.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vrt_re.c b/bin/varnishd/cache_vrt_re.c index 0ae09ae..9c6cb99 100644 --- a/bin/varnishd/cache_vrt_re.c +++ b/bin/varnishd/cache_vrt_re.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c index 6fe7b6c..5f3ecb5 100644 --- a/bin/varnishd/cache_vrt_var.c +++ b/bin/varnishd/cache_vrt_var.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_vrt_vmod.c b/bin/varnishd/cache_vrt_vmod.c index 7d03fac..9844413 100644 --- a/bin/varnishd/cache_vrt_vmod.c +++ b/bin/varnishd/cache_vrt_vmod.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_waiter.h b/bin/varnishd/cache_waiter.h index 257a70b..2e0953b 100644 --- a/bin/varnishd/cache_waiter.h +++ b/bin/varnishd/cache_waiter.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_waiter_epoll.c b/bin/varnishd/cache_waiter_epoll.c index a44f8a0..fe64961 100644 --- a/bin/varnishd/cache_waiter_epoll.c +++ b/bin/varnishd/cache_waiter_epoll.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Rogerio Carvalho Schneider diff --git a/bin/varnishd/cache_waiter_kqueue.c b/bin/varnishd/cache_waiter_kqueue.c index 246680c..ea0e2fc 100644 --- a/bin/varnishd/cache_waiter_kqueue.c +++ b/bin/varnishd/cache_waiter_kqueue.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_waiter_poll.c b/bin/varnishd/cache_waiter_poll.c index cef0513..42b54dc 100644 --- a/bin/varnishd/cache_waiter_poll.c +++ b/bin/varnishd/cache_waiter_poll.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_waiter_ports.c b/bin/varnishd/cache_waiter_ports.c index 0858c67..9ee3aea 100644 --- a/bin/varnishd/cache_waiter_ports.c +++ b/bin/varnishd/cache_waiter_ports.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS + * Copyright (c) 2006 Varnish Software AS * Copyright (c) 2007 OmniTI Computer Consulting, Inc. * Copyright (c) 2007 Theo Schlossnagle * Copyright (c) 2010 UPLEX, Nils Goroll diff --git a/bin/varnishd/cache_wrw.c b/bin/varnishd/cache_wrw.c index 5567f94..946f488 100644 --- a/bin/varnishd/cache_wrw.c +++ b/bin/varnishd/cache_wrw.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/cache_ws.c b/bin/varnishd/cache_ws.c index 10f96ba..a803797 100644 --- a/bin/varnishd/cache_ws.c +++ b/bin/varnishd/cache_ws.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/common.h b/bin/varnishd/common.h index 45bc894..1a64cf3 100644 --- a/bin/varnishd/common.h +++ b/bin/varnishd/common.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/default.vcl b/bin/varnishd/default.vcl index 59ed706..412b6e9 100644 --- a/bin/varnishd/default.vcl +++ b/bin/varnishd/default.vcl @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/hash_classic.c b/bin/varnishd/hash_classic.c index 4b7c928..9b8c7d8 100644 --- a/bin/varnishd/hash_classic.c +++ b/bin/varnishd/hash_classic.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/hash_critbit.c b/bin/varnishd/hash_critbit.c index 4dff8db..0a1ccca 100644 --- a/bin/varnishd/hash_critbit.c +++ b/bin/varnishd/hash_critbit.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/hash_simple_list.c b/bin/varnishd/hash_simple_list.c index 811aa8a..5cb1fc1 100644 --- a/bin/varnishd/hash_simple_list.c +++ b/bin/varnishd/hash_simple_list.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/hash_slinger.h b/bin/varnishd/hash_slinger.h index 42fa50b..b9430c7 100644 --- a/bin/varnishd/hash_slinger.h +++ b/bin/varnishd/hash_slinger.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h index fb94043..16828ed 100644 --- a/bin/varnishd/heritage.h +++ b/bin/varnishd/heritage.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/locks.h b/bin/varnishd/locks.h index 1ca024f..e0a6bd5 100644 --- a/bin/varnishd/locks.h +++ b/bin/varnishd/locks.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt.h b/bin/varnishd/mgt.h index 7e03657..30b90ba 100644 --- a/bin/varnishd/mgt.h +++ b/bin/varnishd/mgt.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c index 4397cd3..2a9d826 100644 --- a/bin/varnishd/mgt_child.c +++ b/bin/varnishd/mgt_child.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index 70f5828..b09eb44 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_cli.h b/bin/varnishd/mgt_cli.h index 9eef792..8c49abb 100644 --- a/bin/varnishd/mgt_cli.h +++ b/bin/varnishd/mgt_cli.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index 8b82350..4142197 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_pool.c b/bin/varnishd/mgt_pool.c index 56f9dca..1238f5e 100644 --- a/bin/varnishd/mgt_pool.c +++ b/bin/varnishd/mgt_pool.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_sandbox.c b/bin/varnishd/mgt_sandbox.c index 653f1d5..0299cfd 100644 --- a/bin/varnishd/mgt_sandbox.c +++ b/bin/varnishd/mgt_sandbox.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2011 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c index d3d1f87..ceb5e7f 100644 --- a/bin/varnishd/mgt_shmem.c +++ b/bin/varnishd/mgt_shmem.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c index d793a0e..d1b3e57 100644 --- a/bin/varnishd/mgt_vcc.c +++ b/bin/varnishd/mgt_vcc.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c index 97bbe81..83ebd71 100644 --- a/bin/varnishd/rfc2616.c +++ b/bin/varnishd/rfc2616.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/steps.h b/bin/varnishd/steps.h index d45b5a7..c88e434 100644 --- a/bin/varnishd/steps.h +++ b/bin/varnishd/steps.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c index 256c994..d33825e 100644 --- a/bin/varnishd/stevedore.c +++ b/bin/varnishd/stevedore.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007-2010 Redpill Linpro AS + * Copyright (c) 2007-2011 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgav diff --git a/bin/varnishd/stevedore.h b/bin/varnishd/stevedore.h index cef22ea..5a5cc4b 100644 --- a/bin/varnishd/stevedore.h +++ b/bin/varnishd/stevedore.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/stevedore_utils.c b/bin/varnishd/stevedore_utils.c index 0a8e9cb..a38588d 100644 --- a/bin/varnishd/stevedore_utils.c +++ b/bin/varnishd/stevedore_utils.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_file.c b/bin/varnishd/storage_file.c index 19ce1dd..27cc86f 100644 --- a/bin/varnishd/storage_file.c +++ b/bin/varnishd/storage_file.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_malloc.c b/bin/varnishd/storage_malloc.c index 1d13520..12a390f 100644 --- a/bin/varnishd/storage_malloc.c +++ b/bin/varnishd/storage_malloc.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_persistent.c b/bin/varnishd/storage_persistent.c index 427f687..28d1de2 100644 --- a/bin/varnishd/storage_persistent.c +++ b/bin/varnishd/storage_persistent.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_persistent.h b/bin/varnishd/storage_persistent.h index e7c7344..2a5bd77 100644 --- a/bin/varnishd/storage_persistent.h +++ b/bin/varnishd/storage_persistent.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_persistent_mgt.c b/bin/varnishd/storage_persistent_mgt.c index 240057f..0681264 100644 --- a/bin/varnishd/storage_persistent_mgt.c +++ b/bin/varnishd/storage_persistent_mgt.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_persistent_silo.c b/bin/varnishd/storage_persistent_silo.c index 90b376f..d4ccf1e 100644 --- a/bin/varnishd/storage_persistent_silo.c +++ b/bin/varnishd/storage_persistent_silo.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_persistent_subr.c b/bin/varnishd/storage_persistent_subr.c index 86d1892..ea8d6e2 100644 --- a/bin/varnishd/storage_persistent_subr.c +++ b/bin/varnishd/storage_persistent_subr.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_synth.c b/bin/varnishd/storage_synth.c index b9e53d3..24479e3 100644 --- a/bin/varnishd/storage_synth.c +++ b/bin/varnishd/storage_synth.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/storage_umem.c b/bin/varnishd/storage_umem.c index 37194e3..6e28a94 100644 --- a/bin/varnishd/storage_umem.c +++ b/bin/varnishd/storage_umem.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index a3b6fa9..d15964c 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/vparam.h b/bin/varnishd/vparam.h index fefbba1..2a83de1 100644 --- a/bin/varnishd/vparam.h +++ b/bin/varnishd/vparam.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishd/vsm.c b/bin/varnishd/vsm.c index cc6b125..62047ff 100644 --- a/bin/varnishd/vsm.c +++ b/bin/varnishd/vsm.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Redpill Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c index 948bd57..75f7bd9 100644 --- a/bin/varnishhist/varnishhist.c +++ b/bin/varnishhist/varnishhist.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c index 0a359e0..e33afba 100644 --- a/bin/varnishlog/varnishlog.c +++ b/bin/varnishlog/varnishlog.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 20a9958..d53ddbc 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -1,7 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS - * Copyright (c) 2010 Varnish Software AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Anders Berg diff --git a/bin/varnishreplay/varnishreplay.c b/bin/varnishreplay/varnishreplay.c index f0286b1..71a9c81 100644 --- a/bin/varnishreplay/varnishreplay.c +++ b/bin/varnishreplay/varnishreplay.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Cecilie Fritzvold diff --git a/bin/varnishsizes/varnishsizes.c b/bin/varnishsizes/varnishsizes.c index f0a51d6..ccff669 100644 --- a/bin/varnishsizes/varnishsizes.c +++ b/bin/varnishsizes/varnishsizes.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c index b389175..b5b1e6f 100644 --- a/bin/varnishstat/varnishstat.c +++ b/bin/varnishstat/varnishstat.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishstat/varnishstat.h b/bin/varnishstat/varnishstat.h index 13d7363..245af35 100644 --- a/bin/varnishstat/varnishstat.h +++ b/bin/varnishstat/varnishstat.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c index 75fab45..d0eb001 100644 --- a/bin/varnishstat/varnishstat_curses.c +++ b/bin/varnishstat/varnishstat_curses.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c index d3bd8b2..5b14edc 100644 --- a/bin/varnishtest/vtc.c +++ b/bin/varnishtest/vtc.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h index 656c0bf..16d577f 100644 --- a/bin/varnishtest/vtc.h +++ b/bin/varnishtest/vtc.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c index 158d044..20b152b 100644 --- a/bin/varnishtest/vtc_client.c +++ b/bin/varnishtest/vtc_client.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 2e6a945..5c470d3 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c index c92f13e..f0841c0 100644 --- a/bin/varnishtest/vtc_log.c +++ b/bin/varnishtest/vtc_log.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c index 94abbf6..8775950 100644 --- a/bin/varnishtest/vtc_main.c +++ b/bin/varnishtest/vtc_main.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_sema.c b/bin/varnishtest/vtc_sema.c index 92b1a7a..071b4c0 100644 --- a/bin/varnishtest/vtc_sema.c +++ b/bin/varnishtest/vtc_sema.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Linpro AS +/*- + * Copyright (c) 2008-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_server.c b/bin/varnishtest/vtc_server.c index 28d3b8f..061d9cc 100644 --- a/bin/varnishtest/vtc_server.c +++ b/bin/varnishtest/vtc_server.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index 66ad107..efcdde7 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2008-2010 Redpill Linpro AS +/*- + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c index 6b39b85..8459ab5 100644 --- a/bin/varnishtop/varnishtop.c +++ b/bin/varnishtop/varnishtop.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/configure.ac b/configure.ac index 8ab0a9f..9087625 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,6 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006-2010 Linpro AS -Copyright (c) 2010-2011 Varnish Software AS]) +Copyright (c) 2006-2011 Varnish Software AS]) AC_REVISION([$Id$]) AC_INIT([Varnish], [3.0.0-beta1], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/varnishapi.h) diff --git a/doc/sphinx/reference/varnishadm.rst b/doc/sphinx/reference/varnishadm.rst index af68355..7d543c2 100644 --- a/doc/sphinx/reference/varnishadm.rst +++ b/doc/sphinx/reference/varnishadm.rst @@ -84,6 +84,4 @@ COPYRIGHT This document is licensed under the same licence as Varnish itself. See LICENCE for details. -* Copyright (c) 2007-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2007-2011 Varnish Software AS diff --git a/doc/sphinx/reference/varnishd.rst b/doc/sphinx/reference/varnishd.rst index 4036f65..e6c1798 100644 --- a/doc/sphinx/reference/varnishd.rst +++ b/doc/sphinx/reference/varnishd.rst @@ -787,7 +787,7 @@ HISTORY ======= The varnishd daemon was developed by Poul-Henning Kamp in cooperation -with Verdens Gang AS, Linpro AS and Varnish Software. +with Verdens Gang AS, Varnish Software AS and Varnish Software. This manual page was written by Dag-Erling Sm?rgrav with updates by Stig Sandbeck Mathisen ?ssm at debian.org? @@ -799,6 +799,4 @@ COPYRIGHT This document is licensed under the same licence as Varnish itself. See LICENCE for details. -* Copyright (c) 2007-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2007-2011 Varnish Software AS diff --git a/doc/sphinx/reference/varnishhist.rst b/doc/sphinx/reference/varnishhist.rst index 5c0cc05..ffc8289 100644 --- a/doc/sphinx/reference/varnishhist.rst +++ b/doc/sphinx/reference/varnishhist.rst @@ -81,7 +81,7 @@ SEE ALSO HISTORY ======= The varnishhist utility was developed by Poul-Henning Kamp in cooperation with Verdens Gang -AS and Linpro AS. This manual page was written by Dag-Erling Sm?rgrav. +AS and Varnish Software AS. This manual page was written by Dag-Erling Sm?rgrav. COPYRIGHT ========= @@ -90,6 +90,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2011 Varnish Software AS diff --git a/doc/sphinx/reference/varnishlog.rst b/doc/sphinx/reference/varnishlog.rst index 2c74e24..8f67765 100644 --- a/doc/sphinx/reference/varnishlog.rst +++ b/doc/sphinx/reference/varnishlog.rst @@ -163,7 +163,7 @@ HISTORY ======= The varnishlog utility was developed by Poul-Henning Kamp ?phk at phk.freebsd.dk? in cooperation with Verdens Gang -AS, Linpro AS and Varnish Software. This manual page was initially written by Dag-Erling Sm?rgrav. +AS, Varnish Software AS and Varnish Software. This manual page was initially written by Dag-Erling Sm?rgrav. COPYRIGHT @@ -173,6 +173,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2011 Varnish Software AS diff --git a/doc/sphinx/reference/varnishncsa.rst b/doc/sphinx/reference/varnishncsa.rst index 3fe1b35..414e07e 100644 --- a/doc/sphinx/reference/varnishncsa.rst +++ b/doc/sphinx/reference/varnishncsa.rst @@ -152,7 +152,7 @@ HISTORY ======= The varnishncsa utility was developed by Poul-Henning Kamp in -cooperation with Verdens Gang AS and Linpro AS. This manual page was +cooperation with Verdens Gang AS and Varnish Software AS. This manual page was written by Dag-Erling Sm?rgrav ?des at des.no?. @@ -163,6 +163,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2011 Varnish Software AS diff --git a/doc/sphinx/reference/varnishreplay.rst b/doc/sphinx/reference/varnishreplay.rst index bcbd1ab..4be103f 100644 --- a/doc/sphinx/reference/varnishreplay.rst +++ b/doc/sphinx/reference/varnishreplay.rst @@ -53,5 +53,4 @@ COPYRIGHT This document is licensed under the same licence as Varnish itself. See LICENCE for details. -* Copyright (c) 2007 Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2007-2010 Varnish Software AS diff --git a/doc/sphinx/reference/varnishstat.rst b/doc/sphinx/reference/varnishstat.rst index 23d4266..09c4989 100644 --- a/doc/sphinx/reference/varnishstat.rst +++ b/doc/sphinx/reference/varnishstat.rst @@ -80,7 +80,7 @@ HISTORY ======= The varnishstat utility was originally developed by Poul-Henning Kamp -?phk at phk.freebsd.dk? in cooperation with Verdens Gang AS, Linpro AS +?phk at phk.freebsd.dk? in cooperation with Verdens Gang AS, Varnish Software AS and Varnish Software. Manual page written by Dag-Erling Sm?rgrav, and Per Buer. @@ -91,6 +91,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2008 Varnish Software AS diff --git a/doc/sphinx/reference/varnishtest.rst b/doc/sphinx/reference/varnishtest.rst index 961cd81..c2aaae9 100644 --- a/doc/sphinx/reference/varnishtest.rst +++ b/doc/sphinx/reference/varnishtest.rst @@ -189,7 +189,8 @@ HISTORY ======= The varnishtest program was developed by Poul-Henning Kamp -?phk at phk.freebsd.dk? in cooperation with Linpro AS. This manual page +?phk at phk.freebsd.dk? in cooperation with Varnish Software AS. +This manual page was written by Stig Sandbeck Mathisen ?ssm at linpro.no? using examples by Poul-Henning Kamp ?phk at phk.freebsd.dk?. @@ -199,5 +200,4 @@ COPYRIGHT This document is licensed under the same licence as Varnish itself. See LICENCE for details. -* Copyright (c) 2007-2008 Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2007-2008 Varnish Software AS diff --git a/doc/sphinx/reference/varnishtop.rst b/doc/sphinx/reference/varnishtop.rst index 0fe65fc..9b3ca9f 100644 --- a/doc/sphinx/reference/varnishtop.rst +++ b/doc/sphinx/reference/varnishtop.rst @@ -101,7 +101,7 @@ HISTORY ======= The varnishtop utility was originally developed by Poul-Henning Kamp -in cooperation with Verdens Gang AS and Linpro AS, and later +in cooperation with Verdens Gang AS and Varnish Software AS, and later substantially rewritten by Dag-Erling Sm?rgrav. This manual page was written by Dag-Erling Sm?rgrav. @@ -112,6 +112,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2011 Varnish Software AS diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 4a88dd1..17ccf88 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -881,7 +881,7 @@ HISTORY ======= The VCL language was developed by Poul-Henning Kamp in cooperation -with Verdens Gang AS, Linpro AS and Varnish Software. This manual +with Verdens Gang AS, Varnish Software AS and Varnish Software. This manual page was written by Dag-Erling Sm?rgrav and later edited by Poul-Henning Kamp and Per Buer. @@ -892,6 +892,4 @@ This document is licensed under the same licence as Varnish itself. See LICENCE for details. * Copyright (c) 2006 Verdens Gang AS -* Copyright (c) 2006-2008 Linpro AS -* Copyright (c) 2008-2010 Redpill Linpro AS -* Copyright (c) 2010 Varnish Software AS +* Copyright (c) 2006-2011 Varnish Software AS diff --git a/include/ban_vars.h b/include/ban_vars.h index df94d15..669b9b1 100644 --- a/include/ban_vars.h +++ b/include/ban_vars.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/binary_heap.h b/include/binary_heap.h index fb27169..d987104 100644 --- a/include/binary_heap.h +++ b/include/binary_heap.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/cli.h b/include/cli.h index 1ee035f..a3500a6 100644 --- a/include/cli.h +++ b/include/cli.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/cli_common.h b/include/cli_common.h index 0e8ba8c..9dd3968 100644 --- a/include/cli_common.h +++ b/include/cli_common.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/cli_priv.h b/include/cli_priv.h index ae0343b..60d6d69 100644 --- a/include/cli_priv.h +++ b/include/cli_priv.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/cli_serve.h b/include/cli_serve.h index 5874efa..0ac29f8 100644 --- a/include/cli_serve.h +++ b/include/cli_serve.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Redpill Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/compat/daemon.h b/include/compat/daemon.h index 54ff8d6..3f987f6 100644 --- a/include/compat/daemon.h +++ b/include/compat/daemon.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/include/compat/srandomdev.h b/include/compat/srandomdev.h index 2433e49..e1b8c78 100644 --- a/include/compat/srandomdev.h +++ b/include/compat/srandomdev.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/include/http_headers.h b/include/http_headers.h index 2ded005..afb463c 100644 --- a/include/http_headers.h +++ b/include/http_headers.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/http_response.h b/include/http_response.h index 8477c43..f60820c 100644 --- a/include/http_response.h +++ b/include/http_response.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/libvarnish.h b/include/libvarnish.h index fb1241c..afa9f2f 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/libvcl.h b/include/libvcl.h index 9b95ac1..a92906f 100644 --- a/include/libvcl.h +++ b/include/libvcl.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/persistent.h b/include/persistent.h index 57ac628..ff9207e 100644 --- a/include/persistent.h +++ b/include/persistent.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/varnishapi.h b/include/varnishapi.h index 74ec7a1..d220096 100644 --- a/include/varnishapi.h +++ b/include/varnishapi.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vas.h b/include/vas.h index dc2a835..a4c9c6f 100644 --- a/include/vas.h +++ b/include/vas.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vav.h b/include/vav.h index 4a7e809..a3861cf 100644 --- a/include/vav.h +++ b/include/vav.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vbm.h b/include/vbm.h index 4b71b86..8443ac7 100644 --- a/include/vbm.h +++ b/include/vbm.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vct.h b/include/vct.h index 0ed53a8..fb4c2af 100644 --- a/include/vct.h +++ b/include/vct.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vev.h b/include/vev.h index 879fcdc..60737bf 100644 --- a/include/vev.h +++ b/include/vev.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vin.h b/include/vin.h index 17ff389..f627ab5 100644 --- a/include/vin.h +++ b/include/vin.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vmb.h b/include/vmb.h index a10eb5a..9c148fb 100644 --- a/include/vmb.h +++ b/include/vmb.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Redpill Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vre.h b/include/vre.h index 8d3ad55..47dea3f 100644 --- a/include/vre.h +++ b/include/vre.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Redpill Linpro AS + * Copyright (c) 2009 Varnish Software AS * All rights reserved. * * Author: Tollef Fog Heen diff --git a/include/vrt.h b/include/vrt.h index 18ebab7..cfafe75 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsb.h b/include/vsb.h index 6544cbf..5bfbce7 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2008 Poul-Henning Kamp + * Copyright (c) 2000-2011 Poul-Henning Kamp * Copyright (c) 2000-2008 Dag-Erling Co?dan Sm?rgrav * All rights reserved. * diff --git a/include/vsc.h b/include/vsc.h index 498f9df..1256dae 100644 --- a/include/vsc.h +++ b/include/vsc.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsc_all.h b/include/vsc_all.h index 1ac9415..24fa8ec 100644 --- a/include/vsc_all.h +++ b/include/vsc_all.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsc_fields.h b/include/vsc_fields.h index a96da33..0289b81 100644 --- a/include/vsc_fields.h +++ b/include/vsc_fields.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsl.h b/include/vsl.h index 24acfa6..288c5c7 100644 --- a/include/vsl.h +++ b/include/vsl.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsl_tags.h b/include/vsl_tags.h index 088ea93..bae0a4a 100644 --- a/include/vsl_tags.h +++ b/include/vsl_tags.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vsm.h b/include/vsm.h index 62f3b48..98e8610 100644 --- a/include/vsm.h +++ b/include/vsm.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/include/vss.h b/include/vss.h index 5726685..d98aa1d 100644 --- a/include/vss.h +++ b/include/vss.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/lib/libvarnish/argv.c b/lib/libvarnish/argv.c index 3fb2840..ad088cd 100644 --- a/lib/libvarnish/argv.c +++ b/lib/libvarnish/argv.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/assert.c b/lib/libvarnish/assert.c index 9422cfc..82351ce 100644 --- a/lib/libvarnish/assert.c +++ b/lib/libvarnish/assert.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/binary_heap.c b/lib/libvarnish/binary_heap.c index 34ca793..e6a00e7 100644 --- a/lib/libvarnish/binary_heap.c +++ b/lib/libvarnish/binary_heap.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/cli_auth.c b/lib/libvarnish/cli_auth.c index 87e113e..45c0909 100644 --- a/lib/libvarnish/cli_auth.c +++ b/lib/libvarnish/cli_auth.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index 66cab67..ed7837e 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index 3b32866..571ee29 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/num.c b/lib/libvarnish/num.c index 7ba587e..5ef2cd7 100644 --- a/lib/libvarnish/num.c +++ b/lib/libvarnish/num.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/subproc.c b/lib/libvarnish/subproc.c index e2b4264..99f924e 100644 --- a/lib/libvarnish/subproc.c +++ b/lib/libvarnish/subproc.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/tcp.c b/lib/libvarnish/tcp.c index 6c892a0..c612e97 100644 --- a/lib/libvarnish/tcp.c +++ b/lib/libvarnish/tcp.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/time.c b/lib/libvarnish/time.c index 8e79a1c..8242853 100644 --- a/lib/libvarnish/time.c +++ b/lib/libvarnish/time.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c index b3e2d6f..adcffdb 100644 --- a/lib/libvarnish/vct.c +++ b/lib/libvarnish/vct.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index f51166b..070a056 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav @@ -40,6 +40,6 @@ VCS_Message(const char *progname) { fprintf(stderr, "%s (%s-%s revision %s)\n", progname, PACKAGE_TARNAME, PACKAGE_VERSION, VCS_Version()); - fprintf(stderr, - "Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS\n"); + fprintf(stderr, "Copyright (c) 2006 Verdens Gang AS\n"); + fprintf(stderr, "Copyright (c) 2006-2011 Varnish Software AS\n"); } diff --git a/lib/libvarnish/vev.c b/lib/libvarnish/vev.c index c44c38c..8c64562 100644 --- a/lib/libvarnish/vev.c +++ b/lib/libvarnish/vev.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c index d05a581..0f1b680 100644 --- a/lib/libvarnish/vin.c +++ b/lib/libvarnish/vin.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007-2010 Linpro AS + * Copyright (c) 2007-2010 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/lib/libvarnish/vmb.c b/lib/libvarnish/vmb.c index 7bd8877..7464bbe 100644 --- a/lib/libvarnish/vmb.c +++ b/lib/libvarnish/vmb.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Redpill Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c index 2e1375e..e97758a 100644 --- a/lib/libvarnish/vre.c +++ b/lib/libvarnish/vre.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Redpill Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Tollef Fog Heen diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c index 85ec2f3..42b4db7 100644 --- a/lib/libvarnish/vss.c +++ b/lib/libvarnish/vss.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/lib/libvarnish/vtmpfile.c b/lib/libvarnish/vtmpfile.c index 99160c7..63dde2d 100644 --- a/lib/libvarnish/vtmpfile.c +++ b/lib/libvarnish/vtmpfile.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c index 6e1eea5..d9624b9 100644 --- a/lib/libvarnishapi/vsc.c +++ b/lib/libvarnishapi/vsc.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c index e6ba5ae..2b3b45e 100644 --- a/lib/libvarnishapi/vsl.c +++ b/lib/libvarnishapi/vsl.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishapi/vsl_api.h b/lib/libvarnishapi/vsl_api.h index edf73eb..e1684fd 100644 --- a/lib/libvarnishapi/vsl_api.h +++ b/lib/libvarnishapi/vsl_api.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c index d6426a6..49930c8 100644 --- a/lib/libvarnishapi/vsl_arg.c +++ b/lib/libvarnishapi/vsl_arg.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c index cb96782..8e02400 100644 --- a/lib/libvarnishapi/vsm.c +++ b/lib/libvarnishapi/vsm.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishapi/vsm_api.h b/lib/libvarnishapi/vsm_api.h index 30f2926..519e46d 100644 --- a/lib/libvarnishapi/vsm_api.h +++ b/lib/libvarnishapi/vsm_api.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Redpill Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvarnishcompat/srandomdev.c b/lib/libvarnishcompat/srandomdev.c index bedea6a..79f774d 100644 --- a/lib/libvarnishcompat/srandomdev.c +++ b/lib/libvarnishcompat/srandomdev.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Dag-Erling Sm?rgrav diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index cb9ac40..ffb8a08 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -1,7 +1,7 @@ #!/usr/local/bin/python3.1 #- # Copyright (c) 2006 Verdens Gang AS -# Copyright (c) 2006-2010 Linpro AS +# Copyright (c) 2006-2011 Varnish Software AS # All rights reserved. # # Author: Poul-Henning Kamp diff --git a/lib/libvcl/symbol_kind.h b/lib/libvcl/symbol_kind.h index 89422de..155d36e 100644 --- a/lib/libvcl/symbol_kind.h +++ b/lib/libvcl/symbol_kind.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_acl.c b/lib/libvcl/vcc_acl.c index 9a0d52c..c506c78 100644 --- a/lib/libvcl/vcc_acl.c +++ b/lib/libvcl/vcc_acl.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c index c29a749..801360a 100644 --- a/lib/libvcl/vcc_action.c +++ b/lib/libvcl/vcc_action.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index 6b2b932..3198ce1 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_backend_util.c b/lib/libvcl/vcc_backend_util.c index c0c493f..968ec4e 100644 --- a/lib/libvcl/vcc_backend_util.c +++ b/lib/libvcl/vcc_backend_util.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c index bde3708..b0019ca 100644 --- a/lib/libvcl/vcc_compile.c +++ b/lib/libvcl/vcc_compile.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h index 09138b9..c90d225 100644 --- a/lib/libvcl/vcc_compile.h +++ b/lib/libvcl/vcc_compile.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c index 303a33a..8168a26 100644 --- a/lib/libvcl/vcc_dir_dns.c +++ b/lib/libvcl/vcc_dir_dns.c @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2009 Redpill Linpro AS - * Copyright (c) 2010 Varnish Software AS + * Copyright (c) 2009-2010 Varnish Software AS * All rights reserved. * * Author: Kristian Lyngstol diff --git a/lib/libvcl/vcc_dir_random.c b/lib/libvcl/vcc_dir_random.c index b1aabc2..125e7d1 100644 --- a/lib/libvcl/vcc_dir_random.c +++ b/lib/libvcl/vcc_dir_random.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_dir_round_robin.c b/lib/libvcl/vcc_dir_round_robin.c index a94a5cc..6229c86 100644 --- a/lib/libvcl/vcc_dir_round_robin.c +++ b/lib/libvcl/vcc_dir_round_robin.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Linpro AS + * Copyright (c) 2008-2009 Varnish Software AS * All rights reserved. * * Author: Petter Knudsen diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 5c201b5..82a8aba 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_parse.c b/lib/libvcl/vcc_parse.c index bb42709..c616c3c 100644 --- a/lib/libvcl/vcc_parse.c +++ b/lib/libvcl/vcc_parse.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_priv.h b/lib/libvcl/vcc_priv.h index ae5c712..1e990b2 100644 --- a/lib/libvcl/vcc_priv.h +++ b/lib/libvcl/vcc_priv.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2009 Linpro AS + * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_string.c b/lib/libvcl/vcc_string.c index 707a5d1..06e7277 100644 --- a/lib/libvcl/vcc_string.c +++ b/lib/libvcl/vcc_string.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_symb.c b/lib/libvcl/vcc_symb.c index 7c5cd1f..d473a50 100644 --- a/lib/libvcl/vcc_symb.c +++ b/lib/libvcl/vcc_symb.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c index bc08427..5a1b00c 100644 --- a/lib/libvcl/vcc_token.c +++ b/lib/libvcl/vcc_token.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_types.h b/lib/libvcl/vcc_types.h index 959fe8e..469b56c 100644 --- a/lib/libvcl/vcc_types.h +++ b/lib/libvcl/vcc_types.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_var.c b/lib/libvcl/vcc_var.c index 51d5fcc..94a5fb9 100644 --- a/lib/libvcl/vcc_var.c +++ b/lib/libvcl/vcc_var.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_vmod.c b/lib/libvcl/vcc_vmod.c index c54a4e3..077706c 100644 --- a/lib/libvcl/vcc_vmod.c +++ b/lib/libvcl/vcc_vmod.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvcl/vcc_xref.c b/lib/libvcl/vcc_xref.c index 240555a..2188ef5 100644 --- a/lib/libvcl/vcc_xref.c +++ b/lib/libvcl/vcc_xref.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2010 Linpro AS + * Copyright (c) 2006-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvmod_std/vmod.py b/lib/libvmod_std/vmod.py index 6614115..ee6a021 100755 --- a/lib/libvmod_std/vmod.py +++ b/lib/libvmod_std/vmod.py @@ -1,6 +1,6 @@ #!/usr/local/bin/python #- -# Copyright (c) 2010 Linpro AS +# Copyright (c) 2010-2011 Varnish Software AS # All rights reserved. # # Author: Poul-Henning Kamp diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc index d0ade10..0a71e5b 100644 --- a/lib/libvmod_std/vmod.vcc +++ b/lib/libvmod_std/vmod.vcc @@ -1,5 +1,5 @@ #- -# Copyright (c) 2010 Linpro AS +# Copyright (c) 2010-2011 Varnish Software AS # All rights reserved. # # Author: Poul-Henning Kamp diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c index 10acc5e..544e2dc 100644 --- a/lib/libvmod_std/vmod_std.c +++ b/lib/libvmod_std/vmod_std.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c index 1aaf095..b2c37da 100644 --- a/lib/libvmod_std/vmod_std_conversions.c +++ b/lib/libvmod_std/vmod_std_conversions.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Poul-Henning Kamp diff --git a/lib/libvmod_std/vmod_std_fileread.c b/lib/libvmod_std/vmod_std_fileread.c index fdc04a5..e1be09a 100644 --- a/lib/libvmod_std/vmod_std_fileread.c +++ b/lib/libvmod_std/vmod_std_fileread.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Linpro AS + * Copyright (c) 2010-2011 Varnish Software AS * All rights reserved. * * Author: Sanjoy Das From phk at varnish-cache.org Wed Jun 1 13:44:39 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 01 Jun 2011 15:44:39 +0200 Subject: [master] 23de733 We used a wrong test to detect if a streaming pass could delete object data, and therefore also deleted when we should not. Message-ID: commit 23de733b2e4e25cec3e24962b2dfe40bb040ea14 Author: Poul-Henning Kamp Date: Wed Jun 1 10:36:37 2011 +0000 We used a wrong test to detect if a streaming pass could delete object data, and therefore also deleted when we should not. Fixes #929 diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 407233b..4b4b46b 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -455,7 +455,8 @@ RES_StreamPoll(const struct sess *sp) if (!(sp->wrk->res_mode & RES_GUNZIP)) (void)WRW_Flush(sp->wrk); - if (sp->objcore == NULL || (sp->objcore->flags & OC_F_PASS)) { + if (sp->obj->objcore == NULL || + (sp->obj->objcore->flags & OC_F_PASS)) { /* * This is a pass object, release storage as soon as we * have delivered it. diff --git a/bin/varnishtest/tests/r00929.vtc b/bin/varnishtest/tests/r00929.vtc new file mode 100644 index 0000000..3b2f7ca --- /dev/null +++ b/bin/varnishtest/tests/r00929.vtc @@ -0,0 +1,26 @@ +varnishtest "stream test" + + +server s1 { + rxreq + txresp -bodylen 400 +} -start + +varnish v1 -vcl+backend { + + sub vcl_fetch { + set beresp.do_stream = true; + } + +} -start + +client c1 { + txreq + rxresp + expect resp.bodylen == 400 + txreq + rxresp + expect resp.bodylen == 400 +} -run + + diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 5c470d3..55228d5 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -243,7 +243,8 @@ cmd_http_expect(CMD_ARGS) vtc_log(hp->vl, 4, "EXPECT %s (%s) %s %s (%s) match", av[0], lhs, av[1], av[2], rhs); } else { - vtc_log(hp->vl, 0, "EXPECT %s (%s) %s %s (%s) not implemented", + vtc_log(hp->vl, 0, + "EXPECT %s (%s) %s %s (%s) test not implemented", av[0], lhs, av[1], av[2], rhs); } } From phk at varnish-cache.org Wed Jun 1 13:44:40 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 01 Jun 2011 15:44:40 +0200 Subject: [master] cdda889 Update FlexeLint controls to match renames. Message-ID: commit cdda8895284f3adbe6acb7900478ae051b89f6cc Author: Poul-Henning Kamp Date: Wed Jun 1 13:44:25 2011 +0000 Update FlexeLint controls to match renames. diff --git a/bin/flint.lnt b/bin/flint.lnt index b10ceba..d2f7c0e 100644 --- a/bin/flint.lnt +++ b/bin/flint.lnt @@ -14,7 +14,7 @@ /////////////////////////////////////////////////////////////////////// // assert() support, common to libvarnish and libvarnishapi --sem(vas_fail, r_no) +-sem(VAS_Fail, r_no) -emacro(506, assert) // constant value boolean -emacro(827, assert) // loop not reachable -emacro(774, assert) // booelan always true @@ -55,18 +55,18 @@ /////////////////////////////////////////////////////////////////////// // VSB --esym(759, vsb_*) // header decl could be moved --esym(765, vsb_*) // exten could be made static --esym(714, vsb_*) // symb not ref --sem(vsb_new, @p == (1p ? 1p : malloc(1))) --sem(vsb_delete, custodial(1)) - --esym(534, vsb_cat) // Ignore retval --esym(534, vsb_bcat) --esym(534, vsb_putc) --esym(534, vsb_printf) --esym(534, vsb_vprintf) --esym(534, vsb_putc) +-esym(759, VSB_*) // header decl could be moved +-esym(765, VSB_*) // exten could be made static +-esym(714, VSB_*) // symb not ref +-sem(VSB_new, @p == (1p ? 1p : malloc(1))) +-sem(VSB_delete, custodial(1)) + +-esym(534, VSB_cat) // Ignore retval +-esym(534, VSB_bcat) +-esym(534, VSB_putc) +-esym(534, VSB_printf) +-esym(534, VSB_vprintf) +-esym(534, VSB_putc) /////////////////////////////////////////////////////////////////////// // System library/POSIX related From phk at varnish-cache.org Thu Jun 2 06:16:56 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Thu, 02 Jun 2011 08:16:56 +0200 Subject: [master] 31a65a9 Storage allocation failues happen, let other code deal with it. Message-ID: commit 31a65a99d96e061dea7cd689d7b494fe6364e209 Author: Poul-Henning Kamp Date: Thu Jun 2 06:16:34 2011 +0000 Storage allocation failues happen, let other code deal with it. Fixes #927 diff --git a/bin/varnishd/cache_esi_fetch.c b/bin/varnishd/cache_esi_fetch.c index 196cf66..c8df1b1 100644 --- a/bin/varnishd/cache_esi_fetch.c +++ b/bin/varnishd/cache_esi_fetch.c @@ -371,7 +371,7 @@ vfp_esi_end(struct sess *sp) assert(l > 0); /* XXX: This is a huge waste of storage... */ sp->obj->esidata = STV_alloc(sp, l); - AN(sp->obj->esidata); + XXXAN(sp->obj->esidata); memcpy(sp->obj->esidata->ptr, VSB_data(vsb), l); sp->obj->esidata->len = l; VSB_delete(vsb); diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c index d33825e..413e0b6 100644 --- a/bin/varnishd/stevedore.c +++ b/bin/varnishd/stevedore.c @@ -191,7 +191,8 @@ stv_alloc(const struct sess *sp, size_t size) if (++fail == 50) /* XXX Param */ break; } - CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC); + if (st != NULL) + CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC); return (st); } From phk at varnish-cache.org Thu Jun 2 21:31:18 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Thu, 02 Jun 2011 23:31:18 +0200 Subject: [master] 4ea9641 A zero timeout in the VCLI functions should mean "infinity". Message-ID: commit 4ea9641f17a97d8bfec5c7838b701188740c9288 Author: Poul-Henning Kamp Date: Thu Jun 2 21:30:42 2011 +0000 A zero timeout in the VCLI functions should mean "infinity". This fixes "varnishadm -t 0" diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index ed7837e..3b7a0aa 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -118,13 +118,17 @@ VCLI_WriteResult(int fd, const struct cli *cli) static int read_tmo(int fd, char *ptr, unsigned len, double tmo) { - int i, j; + int i, j, to; struct pollfd pfd; + if (tmo > 0) + to = tmo * 1e3; + else + to = -1; pfd.fd = fd; pfd.events = POLLIN; for (j = 0; len > 0; ) { - i = poll(&pfd, 1, (int)(tmo * 1e3)); + i = poll(&pfd, 1, to); if (i == 0) { errno = ETIMEDOUT; return (-1); From phk at varnish-cache.org Thu Jun 2 23:00:06 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 03 Jun 2011 01:00:06 +0200 Subject: [master] a39be7a I am so totally making shit up as I go along... Message-ID: commit a39be7ab6a44ee0ecc5bf512a8a4b654ae5ca5ff Author: Poul-Henning Kamp Date: Thu Jun 2 22:59:43 2011 +0000 I am so totally making shit up as I go along... diff --git a/doc/sphinx/phk/index.rst b/doc/sphinx/phk/index.rst index ee5a2c9..6264f55 100644 --- a/doc/sphinx/phk/index.rst +++ b/doc/sphinx/phk/index.rst @@ -8,6 +8,7 @@ You may or may not want to know what Poul-Henning think. .. toctree:: + three-zero.rst ssl.rst gzip.rst vcl_expr.rst diff --git a/doc/sphinx/phk/three-zero.rst b/doc/sphinx/phk/three-zero.rst new file mode 100644 index 0000000..41499b0 --- /dev/null +++ b/doc/sphinx/phk/three-zero.rst @@ -0,0 +1,69 @@ +.. _phk_3.0: + +================================== +Thoughts on the eve of Varnish 3.0 +================================== + +Five years ago, I was busy transforming my pile of random doddles +on 5mm squared paper into software, according to "git log" working +on the first stevedores. + +In two weeks I will be attending the Varnish 3.0 release party in Oslo. + +Sometimes I feel that development of Varnish takes for ever and +ever, and that it must be like watching paint dry for the users, +but 3 major releases in 5 years is actually not too shabby come to +think of it. + +Varnish 3.0 "only" has two big new features, VMOD and GZIP, and a +host of smaller changes, which you will notice if they are new +features, and not notice if they are bug fixes. + +GZIP will probably be most important to the ESI users, and I wonder +if all the time I spent fiddling bits in the middle of compressed data +pays off, or if the concept of patchwork-quilting GZIP files was +a bad idea from end to other. + +VMODs on the other hand, was an instant success, because they make +it much easier for people to extend Varnish with new functionality, +and I know of several VMODs in the pipeline which will make it +possible to do all sorts of wonderful things from VCL. + +All in all, I feel happy about the 3.0 release, and I hope the users +will too. + +We are not finished of course, ideas and patches for Varnish 4.0 +are already starting to pile up, and hopefully we can get that into +a sensible shape 18 months from now, late 2012-ish. + + "Life is what happens to you while you're busy making other plans" + +said John Lennon, a famous murder victim from New York. + +I feel a similar irony in the way Varnish happened to me: + +My homepage is written in raw HTML using the vi(1) editor, runs on +a book-sized Soekris NET5501 computer, averages 50 hits a day with +an Alexa rank just north of the 3.5 million mark. A normal server +with Varnish could deliver all traffic my webserver has ever +delivered, in less than a second. + +But varnish-cache.org has Alexa rank around 30.000, "varnish cache" +shows a nice trend on Google and #varnish confuses the heck out of +teenage girls and wood workers on Twitter, so clearly I am doing +something right. + +I still worry about the `The Fraud Police +`_ though, +"I have no idea what I'm doing, and I totally make shit up as I go +along." is a disturbingly precise summary of how I feel about my +work in Varnish. + +The Varnish 3.0 release is therefore dedicated to all the kind +Varnish developers and users, who have tested, reported bugs, +suggested ideas and generally put up with me and my bumbling ways +for these past five years. + +Much appreciated, + +Poul-Henning, 2011-06-02 From tfheen at varnish-cache.org Mon Jun 6 08:15:59 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 10:15:59 +0200 Subject: [master] d223152 Drop isfinite for integer conversion Message-ID: commit d223152d5e233493ac2fdb461c309a9418d871ac Author: Tollef Fog Heen Date: Mon Jun 6 09:58:36 2011 +0200 Drop isfinite for integer conversion Checking for isfinite does not make any sense for an integer conversion and causes compilation problems on Solaris. Fixes: #931 diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c index b2c37da..6d27ce5 100644 --- a/lib/libvmod_std/vmod_std_conversions.c +++ b/lib/libvmod_std/vmod_std_conversions.c @@ -109,9 +109,6 @@ vmod_integer(struct sess *sp, const char *p, int i) r = strtol(p, &e, 0); - if (!isfinite(r)) - return (i); - if (e == NULL) return (i); From phk at varnish-cache.org Mon Jun 6 08:35:14 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 10:35:14 +0200 Subject: [master] 332c520 Move CLI_AUTH_RESPONSE_LEN define to cli.h, exclude terminating NUL. Message-ID: commit 332c520c34fb00f980be1e48204928a64a2b2a53 Author: Poul-Henning Kamp Date: Mon Jun 6 08:34:52 2011 +0000 Move CLI_AUTH_RESPONSE_LEN define to cli.h, exclude terminating NUL. diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index e3f97a3..d52c363 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -88,7 +88,7 @@ cli_sock(const char *T_arg, const char *S_arg) int sock; unsigned status; char *answer = NULL; - char buf[CLI_AUTH_RESPONSE_LEN]; + char buf[CLI_AUTH_RESPONSE_LEN + 1]; sock = VSS_open(T_arg, timeout); if (sock < 0) { diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index b09eb44..ee62ada 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -275,7 +275,7 @@ static void mcf_auth(struct cli *cli, const char *const *av, void *priv) { int fd; - char buf[CLI_AUTH_RESPONSE_LEN]; + char buf[CLI_AUTH_RESPONSE_LEN + 1]; AN(av[2]); (void)priv; diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index efcdde7..3863c64 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -339,7 +339,7 @@ varnish_launch(struct varnish *v) nfd = open(abuf, O_RDONLY); assert(nfd >= 0); - assert(sizeof abuf >= CLI_AUTH_RESPONSE_LEN + 6); + assert(sizeof abuf >= CLI_AUTH_RESPONSE_LEN + 7); strcpy(abuf, "auth "); VCLI_AuthResponse(nfd, r, abuf + 5); AZ(close(nfd)); diff --git a/include/cli.h b/include/cli.h index a3500a6..3b16877 100644 --- a/include/cli.h +++ b/include/cli.h @@ -206,3 +206,5 @@ enum VCLI_status_e { /* Length of first line of response */ #define CLI_LINE0_LEN 13 +#define CLI_AUTH_RESPONSE_LEN 64 /* 64 hex + NUL */ + diff --git a/include/cli_common.h b/include/cli_common.h index 9dd3968..602afb0 100644 --- a/include/cli_common.h +++ b/include/cli_common.h @@ -47,7 +47,5 @@ struct cli { int VCLI_WriteResult(int fd, const struct cli *cli); int VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo); -#define CLI_AUTH_RESPONSE_LEN 65 /* 64 hex + NUL */ - void VCLI_AuthResponse(int S_fd, const char *challenge, - char reponse[CLI_AUTH_RESPONSE_LEN]); + char reponse[CLI_AUTH_RESPONSE_LEN + 1]); diff --git a/lib/libvarnish/cli_auth.c b/lib/libvarnish/cli_auth.c index 45c0909..35d2ad6 100644 --- a/lib/libvarnish/cli_auth.c +++ b/lib/libvarnish/cli_auth.c @@ -40,13 +40,13 @@ void VCLI_AuthResponse(int S_fd, const char *challenge, - char response[CLI_AUTH_RESPONSE_LEN]) + char response[CLI_AUTH_RESPONSE_LEN + 1]) { SHA256_CTX ctx; uint8_t buf[BUFSIZ]; int i; - assert(CLI_AUTH_RESPONSE_LEN == (SHA256_LEN * 2 + 1)); + assert(CLI_AUTH_RESPONSE_LEN == (SHA256_LEN * 2)); SHA256_Init(&ctx); SHA256_Update(&ctx, challenge, 32); From phk at varnish-cache.org Mon Jun 6 08:35:15 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 10:35:15 +0200 Subject: [master] 50b7975 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 50b7975c467ab82e6f2fc5b244c2fd0a7d7c4b8a Merge: 332c520 d223152 Author: Poul-Henning Kamp Date: Mon Jun 6 08:35:12 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Mon Jun 6 08:43:17 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 10:43:17 +0200 Subject: [master] df74fe4 Unlearn struct cli from VCLI_WriteResult() Message-ID: commit df74fe4c540e4e7b0dbd7932e5bca96cc0f6ae9d Author: Poul-Henning Kamp Date: Mon Jun 6 08:42:59 2011 +0000 Unlearn struct cli from VCLI_WriteResult() diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index ee62ada..d3a0c67 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -400,7 +400,7 @@ mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f mcf_banner(cli, NULL, NULL); } AZ(VSB_finish(cli->sb)); - (void)VCLI_WriteResult(fdo, cli); + (void)VCLI_WriteResult(fdo, cli->result, VSB_data(cli->sb)); ev = vev_new(); diff --git a/include/cli_common.h b/include/cli_common.h index 602afb0..5bad09d 100644 --- a/include/cli_common.h +++ b/include/cli_common.h @@ -44,7 +44,7 @@ struct cli { struct VCLS *cls; }; -int VCLI_WriteResult(int fd, const struct cli *cli); +int VCLI_WriteResult(int fd, unsigned status, const char *result); int VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo); void VCLI_AuthResponse(int S_fd, const char *challenge, diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index 3b7a0aa..7b6c43a 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -83,7 +83,7 @@ VCLI_SetResult(struct cli *cli, unsigned res) } int -VCLI_WriteResult(int fd, const struct cli *cli) +VCLI_WriteResult(int fd, unsigned status, const char *result) { int i, l; struct iovec iov[3]; @@ -93,18 +93,18 @@ VCLI_WriteResult(int fd, const struct cli *cli) * any misformats by snprintf */ - assert(cli->result >= 100); - assert(cli->result <= 999); /*lint !e650 const out of range */ + assert(status >= 100); + assert(status <= 999); /*lint !e650 const out of range */ i = snprintf(res, sizeof res, - "%-3d %-8ld\n", cli->result, (long)VSB_len(cli->sb)); + "%-3d %-8jd\n", status, (intmax_t)strlen(result)); assert(i == CLI_LINE0_LEN); iov[0].iov_base = res; iov[0].iov_len = CLI_LINE0_LEN; - iov[1].iov_base = VSB_data(cli->sb); - iov[1].iov_len = VSB_len(cli->sb); + iov[1].iov_base = (void*)(uintptr_t)result; /* TRUST ME */ + iov[1].iov_len = strlen(result); iov[2].iov_base = nl; iov[2].iov_len = 1; diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index 571ee29..621f184 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -293,7 +293,8 @@ cls_vlu2(void *priv, char * const *av) cli->cls = NULL; - if (VCLI_WriteResult(cfd->fdo, cli) || cli->result == CLIS_CLOSE) + if (VCLI_WriteResult(cfd->fdo, cli->result, VSB_data(cli->sb)) || + cli->result == CLIS_CLOSE) return (1); return (0); From tfheen at varnish-cache.org Mon Jun 6 08:47:49 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 10:47:49 +0200 Subject: [master] 10571f6 Move base64 implementation to varnishncsa Message-ID: commit 10571f624c85cf24495642ee5066034510c353b4 Author: Tollef Fog Heen Date: Mon Jun 6 10:43:39 2011 +0200 Move base64 implementation to varnishncsa diff --git a/bin/varnishncsa/Makefile.am b/bin/varnishncsa/Makefile.am index e4a2880..f7f4d56 100644 --- a/bin/varnishncsa/Makefile.am +++ b/bin/varnishncsa/Makefile.am @@ -8,6 +8,7 @@ dist_man_MANS = varnishncsa.1 varnishncsa_SOURCES = \ varnishncsa.c \ + base64.c \ $(top_builddir)/lib/libvarnish/flopen.c \ $(top_builddir)/lib/libvarnish/vpf.c diff --git a/bin/varnishncsa/base64.c b/bin/varnishncsa/base64.c new file mode 100644 index 0000000..4ff88ce --- /dev/null +++ b/bin/varnishncsa/base64.c @@ -0,0 +1,87 @@ +/* + * Written by Poul-Henning Kamp + * + * This file is in the public domain. + */ + +#include "config.h" + +#include +#include "varnishapi.h" + +static const char b64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +static char i64[256]; + +void +VB64_init(void) +{ + int i; + const char *p; + + for (i = 0; i < 256; i++) + i64[i] = -1; + for (p = b64, i = 0; *p; p++, i++) + i64[(int)*p] = (char)i; + i64['='] = 0; +} + +int +VB64_decode(char *d, unsigned dlen, const char *s) +{ + unsigned u, v, l; + int i; + + u = 0; + l = 0; + while (*s) { + for (v = 0; v < 4; v++) { + if (!*s) + break; + i = i64[(int)*s++]; + if (i < 0) + return (-1); + u <<= 6; + u |= i; + } + for (v = 0; v < 3; v++) { + if (l >= dlen - 1) + return (-1); + *d = (u >> 16) & 0xff; + u <<= 8; + l++; + d++; + } + } + *d = '\0'; + return (0); +} + +#ifdef TEST_DRIVER +#include + +const char *test1 = +"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz" +"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg" +"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu" +"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo" +"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="; + +int +main(int argc, char **argv) +{ + int i; + char buf[BUFSIZ]; + unsigned l; + + (void)argc; + (void)argv; + + VB64_init(); + l = sizeof buf; + VB64_decode(buf, &l, test1); + printf("%s\n", buf); + return (0); +} +#endif diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am index 0dff413..e30c400 100644 --- a/lib/libvarnishapi/Makefile.am +++ b/lib/libvarnishapi/Makefile.am @@ -21,7 +21,6 @@ libvarnishapi_la_SOURCES = \ ../libvarnish/vre.c \ ../libvarnish/vsb.c \ ../libvarnish/vsha256.c \ - base64.c \ vsm.c \ vsl_arg.c \ vsl.c \ diff --git a/lib/libvarnishapi/base64.c b/lib/libvarnishapi/base64.c deleted file mode 100644 index 4ff88ce..0000000 --- a/lib/libvarnishapi/base64.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Written by Poul-Henning Kamp - * - * This file is in the public domain. - */ - -#include "config.h" - -#include -#include "varnishapi.h" - -static const char b64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -static char i64[256]; - -void -VB64_init(void) -{ - int i; - const char *p; - - for (i = 0; i < 256; i++) - i64[i] = -1; - for (p = b64, i = 0; *p; p++, i++) - i64[(int)*p] = (char)i; - i64['='] = 0; -} - -int -VB64_decode(char *d, unsigned dlen, const char *s) -{ - unsigned u, v, l; - int i; - - u = 0; - l = 0; - while (*s) { - for (v = 0; v < 4; v++) { - if (!*s) - break; - i = i64[(int)*s++]; - if (i < 0) - return (-1); - u <<= 6; - u |= i; - } - for (v = 0; v < 3; v++) { - if (l >= dlen - 1) - return (-1); - *d = (u >> 16) & 0xff; - u <<= 8; - l++; - d++; - } - } - *d = '\0'; - return (0); -} - -#ifdef TEST_DRIVER -#include - -const char *test1 = -"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz" -"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg" -"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu" -"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo" -"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="; - -int -main(int argc, char **argv) -{ - int i; - char buf[BUFSIZ]; - unsigned l; - - (void)argc; - (void)argv; - - VB64_init(); - l = sizeof buf; - VB64_decode(buf, &l, test1); - printf("%s\n", buf); - return (0); -} -#endif From tfheen at varnish-cache.org Mon Jun 6 08:52:21 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 10:52:21 +0200 Subject: [master] a9e6e96 Drop VB64 prototypes from varnishapi.h too Message-ID: commit a9e6e9667efa4ea5b565123de13dde94b4ea7e15 Author: Tollef Fog Heen Date: Mon Jun 6 10:52:13 2011 +0200 Drop VB64 prototypes from varnishapi.h too diff --git a/include/varnishapi.h b/include/varnishapi.h index d220096..0e97755 100644 --- a/include/varnishapi.h +++ b/include/varnishapi.h @@ -262,9 +262,4 @@ int VSL_NextLog(const struct VSM_data *lh, uint32_t **pp, uint64_t *bitmap); int VSL_Matched(const struct VSM_data *vd, uint64_t bitmap); extern const char *VSL_tags[256]; - -/* base64.c */ -void VB64_init(void); -int VB64_decode(char *d, unsigned dlen, const char *s); - #endif From phk at varnish-cache.org Mon Jun 6 08:54:08 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 10:54:08 +0200 Subject: [master] d5015d7 Rename cli.h to vcli.h and allow it to export the varnishapi VCLI convenience functions unless this is disabled with a #define. Message-ID: commit d5015d742f5344cea8ae8297c0509e95cc152ee5 Author: Poul-Henning Kamp Date: Mon Jun 6 08:53:27 2011 +0000 Rename cli.h to vcli.h and allow it to export the varnishapi VCLI convenience functions unless this is disabled with a #define. diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index d52c363..baa4048 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -41,7 +41,7 @@ #include #endif -#include "cli.h" +#include "vcli.h" #include "cli_common.h" #include "libvarnish.h" #include "varnishapi.h" diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c index f11ae54..2b3f87e 100644 --- a/bin/varnishd/cache_acceptor.c +++ b/bin/varnishd/cache_acceptor.c @@ -41,7 +41,7 @@ #include #include -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cache.h" #include "cache_waiter.h" diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index c6cf637..d62cac6 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -51,7 +51,7 @@ #include -#include "cli.h" +#include "vcli.h" #include "vend.h" #include "cli_priv.h" #include "cache.h" diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c index 915f269..387dffb 100644 --- a/bin/varnishd/cache_cli.c +++ b/bin/varnishd/cache_cli.c @@ -43,7 +43,7 @@ #include #include -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cli_common.h" #include "cli_serve.h" diff --git a/bin/varnishd/cache_vcl.c b/bin/varnishd/cache_vcl.c index 444006d..49f3fbb 100644 --- a/bin/varnishd/cache_vcl.c +++ b/bin/varnishd/cache_vcl.c @@ -39,7 +39,7 @@ #include #include -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "vcl.h" #include "cache.h" diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c index 2a9d826..2664931 100644 --- a/bin/varnishd/mgt_child.c +++ b/bin/varnishd/mgt_child.c @@ -46,7 +46,7 @@ #include "mgt.h" #include "vsm.h" #include "heritage.h" -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "mgt_cli.h" #include "vev.h" diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index d3a0c67..e31f3f8 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -47,7 +47,7 @@ #endif #include "cli_priv.h" -#include "cli.h" +#include "vcli.h" #include "vsb.h" #include "cli_common.h" #include "cli_serve.h" diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index 4142197..1caa563 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -40,7 +40,7 @@ #include #include -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cli_common.h" #include "mgt.h" diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c index d1b3e57..9e204bc 100644 --- a/bin/varnishd/mgt_vcc.c +++ b/bin/varnishd/mgt_vcc.c @@ -44,7 +44,7 @@ #include "vsb.h" #include "libvcl.h" -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cli_common.h" diff --git a/bin/varnishd/storage_persistent.c b/bin/varnishd/storage_persistent.c index 28d1de2..a4ba598 100644 --- a/bin/varnishd/storage_persistent.c +++ b/bin/varnishd/storage_persistent.c @@ -48,7 +48,7 @@ #include "stevedore.h" #include "hash_slinger.h" #include "vsha256.h" -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "vend.h" diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index d15964c..9dae7d3 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -55,7 +55,7 @@ #include "vpf.h" #include "vsha256.h" -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cli_common.h" diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index 3863c64..e0f7c21 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -46,7 +46,7 @@ #include "miniobj.h" #include "libvarnish.h" #include "varnishapi.h" -#include "cli.h" +#include "vcli.h" #include "cli_common.h" #include "vss.h" #include "vsb.h" diff --git a/include/Makefile.am b/include/Makefile.am index 6835d0f..10ebd81 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -3,6 +3,7 @@ pkginclude_HEADERS = \ vsm.h \ vsl.h \ + vcli.h \ vsl_tags.h \ vsc_fields.h \ vsc_all.h \ @@ -12,7 +13,6 @@ pkginclude_HEADERS = \ nobase_noinst_HEADERS = \ ban_vars.h \ binary_heap.h \ - cli.h \ cli_common.h \ cli_priv.h \ cli_serve.h \ diff --git a/include/cli.h b/include/cli.h deleted file mode 100644 index 3b16877..0000000 --- a/include/cli.h +++ /dev/null @@ -1,210 +0,0 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006-2011 Varnish Software AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Public definition of the CLI protocol, part of the published Varnish-API. - * - * The overall structure of the protocol is a command-line like - * "command+arguments" request and a IETF style "number + string" response. - * - * Arguments can contain arbitrary sequences of bytes which are encoded - * in back-slash notation in double-quoted, if necessary. - */ - -/* - * These macros define the common data for requests in the CLI protocol. - * The fields are: - * const char * request_name - * const char * request_syntax (for short help) - * const char * request_help (for long help) - * unsigned minimum_arguments - * unsigned maximum_arguments - * - * If you only want a subset of these fields do this: - * #define CLIF145(a,b,c,d,e) a,d,e - * [...] - * CLIF145(CLI_URL_QUERY) - * - */ - -#define CLI_URL_QUERY \ - "url.query", \ - "url.query ", \ - "\tQuery the cache status of a specific URL.\n" \ - "\tReturns the TTL, size and checksum of the object.", \ - 1, 1 - -#define CLI_BAN_URL \ - "ban.url", \ - "ban.url ", \ - "\tAll objects where the urls matches regexp will be " \ - "marked obsolete.", \ - 1, 1 - -#define CLI_BAN \ - "ban", \ - "ban [&& ]...", \ - "\tAll objects where the all the conditions match will be " \ - "marked obsolete.", \ - 3, UINT_MAX - -#define CLI_BAN_LIST \ - "ban.list", \ - "ban.list", \ - "\tList the active bans.", \ - 0, 0 - -#define CLI_VCL_LOAD \ - "vcl.load", \ - "vcl.load ", \ - "\tCompile and load the VCL file under the name provided.", \ - 2, 2 - -#define CLI_VCL_INLINE \ - "vcl.inline", \ - "vcl.inline ", \ - "\tCompile and load the VCL data under the name provided.", \ - 2, 2 - -#define CLI_VCL_DISCARD \ - "vcl.discard", \ - "vcl.discard ", \ - "\tUnload the named configuration (when possible).", \ - 1, 1 - -#define CLI_VCL_LIST \ - "vcl.list", \ - "vcl.list", \ - "\tList all loaded configuration.", \ - 0, 0 - -#define CLI_VCL_SHOW \ - "vcl.show", \ - "vcl.show ", \ - "\tDisplay the source code for the specified configuration.", \ - 1, 1 - -#define CLI_VCL_USE \ - "vcl.use", \ - "vcl.use ", \ - "\tSwitch to the named configuration immediately.", \ - 1, 1 - -#define CLI_PARAM_SHOW \ - "param.show", \ - "param.show [-l] []", \ - "\tShow parameters and their values.", \ - 0, 2 - -#define CLI_PARAM_SET \ - "param.set", \ - "param.set ", \ - "\tSet parameter value.", \ - 2,2 - -#define CLI_SERVER_STOP \ - "stop", \ - "stop", \ - "\tStop the Varnish cache process", \ - 0, 0 - -#define CLI_SERVER_START \ - "start", \ - "start", \ - "\tStart the Varnish cache process.", \ - 0, 0 - -#define CLI_PING \ - "ping", \ - "ping [timestamp]", \ - "\tKeep connection alive", \ - 0, 1 - -#define CLI_HELP \ - "help", \ - "help [command]", \ - "\tShow command/protocol help", \ - 0, 1 - -#define CLI_QUIT \ - "quit", \ - "quit", \ - "\tClose connection", \ - 0, 0 - -#define CLI_SERVER_STATUS \ - "status", \ - "status", \ - "\tCheck status of Varnish cache process.", \ - 0, 0 - -#define CLI_BANNER \ - "banner", \ - "banner", \ - "\tPrint welcome banner.", \ - 0, 0 - -#define CLI_AUTH \ - "auth", \ - "auth response", \ - "\tAuthenticate.", \ - 1, 1 - -#define CLI_PANIC_SHOW \ - "panic.show", \ - "panic.show", \ - "\tReturn the last panic, if any.", \ - 0, 0 - -#define CLI_PANIC_CLEAR \ - "panic.clear", \ - "panic.clear", \ - "\tClear the last panic, if any.", \ - 0, 0 - -/* - * Status/return codes in the CLI protocol - */ - -enum VCLI_status_e { - CLIS_SYNTAX = 100, - CLIS_UNKNOWN = 101, - CLIS_UNIMPL = 102, - CLIS_TOOFEW = 104, - CLIS_TOOMANY = 105, - CLIS_PARAM = 106, - CLIS_AUTH = 107, - CLIS_OK = 200, - CLIS_CANT = 300, - CLIS_COMMS = 400, - CLIS_CLOSE = 500 -}; - -/* Length of first line of response */ -#define CLI_LINE0_LEN 13 -#define CLI_AUTH_RESPONSE_LEN 64 /* 64 hex + NUL */ - diff --git a/include/cli_common.h b/include/cli_common.h index 5bad09d..80d680f 100644 --- a/include/cli_common.h +++ b/include/cli_common.h @@ -43,9 +43,3 @@ struct cli { struct vlu *vlu; struct VCLS *cls; }; - -int VCLI_WriteResult(int fd, unsigned status, const char *result); -int VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo); - -void VCLI_AuthResponse(int S_fd, const char *challenge, - char reponse[CLI_AUTH_RESPONSE_LEN + 1]); diff --git a/include/vcli.h b/include/vcli.h new file mode 100644 index 0000000..cd98f58 --- /dev/null +++ b/include/vcli.h @@ -0,0 +1,217 @@ +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006-2011 Varnish Software AS + * All rights reserved. + * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Public definition of the CLI protocol, part of the published Varnish-API. + * + * The overall structure of the protocol is a command-line like + * "command+arguments" request and a IETF style "number + string" response. + * + * Arguments can contain arbitrary sequences of bytes which are encoded + * in back-slash notation in double-quoted, if necessary. + */ + +/* + * These macros define the common data for requests in the CLI protocol. + * The fields are: + * const char * request_name + * const char * request_syntax (for short help) + * const char * request_help (for long help) + * unsigned minimum_arguments + * unsigned maximum_arguments + * + * If you only want a subset of these fields do this: + * #define CLIF145(a,b,c,d,e) a,d,e + * [...] + * CLIF145(CLI_URL_QUERY) + * + */ + +#define CLI_URL_QUERY \ + "url.query", \ + "url.query ", \ + "\tQuery the cache status of a specific URL.\n" \ + "\tReturns the TTL, size and checksum of the object.", \ + 1, 1 + +#define CLI_BAN_URL \ + "ban.url", \ + "ban.url ", \ + "\tAll objects where the urls matches regexp will be " \ + "marked obsolete.", \ + 1, 1 + +#define CLI_BAN \ + "ban", \ + "ban [&& ]...", \ + "\tAll objects where the all the conditions match will be " \ + "marked obsolete.", \ + 3, UINT_MAX + +#define CLI_BAN_LIST \ + "ban.list", \ + "ban.list", \ + "\tList the active bans.", \ + 0, 0 + +#define CLI_VCL_LOAD \ + "vcl.load", \ + "vcl.load ", \ + "\tCompile and load the VCL file under the name provided.", \ + 2, 2 + +#define CLI_VCL_INLINE \ + "vcl.inline", \ + "vcl.inline ", \ + "\tCompile and load the VCL data under the name provided.", \ + 2, 2 + +#define CLI_VCL_DISCARD \ + "vcl.discard", \ + "vcl.discard ", \ + "\tUnload the named configuration (when possible).", \ + 1, 1 + +#define CLI_VCL_LIST \ + "vcl.list", \ + "vcl.list", \ + "\tList all loaded configuration.", \ + 0, 0 + +#define CLI_VCL_SHOW \ + "vcl.show", \ + "vcl.show ", \ + "\tDisplay the source code for the specified configuration.", \ + 1, 1 + +#define CLI_VCL_USE \ + "vcl.use", \ + "vcl.use ", \ + "\tSwitch to the named configuration immediately.", \ + 1, 1 + +#define CLI_PARAM_SHOW \ + "param.show", \ + "param.show [-l] []", \ + "\tShow parameters and their values.", \ + 0, 2 + +#define CLI_PARAM_SET \ + "param.set", \ + "param.set ", \ + "\tSet parameter value.", \ + 2,2 + +#define CLI_SERVER_STOP \ + "stop", \ + "stop", \ + "\tStop the Varnish cache process", \ + 0, 0 + +#define CLI_SERVER_START \ + "start", \ + "start", \ + "\tStart the Varnish cache process.", \ + 0, 0 + +#define CLI_PING \ + "ping", \ + "ping [timestamp]", \ + "\tKeep connection alive", \ + 0, 1 + +#define CLI_HELP \ + "help", \ + "help [command]", \ + "\tShow command/protocol help", \ + 0, 1 + +#define CLI_QUIT \ + "quit", \ + "quit", \ + "\tClose connection", \ + 0, 0 + +#define CLI_SERVER_STATUS \ + "status", \ + "status", \ + "\tCheck status of Varnish cache process.", \ + 0, 0 + +#define CLI_BANNER \ + "banner", \ + "banner", \ + "\tPrint welcome banner.", \ + 0, 0 + +#define CLI_AUTH \ + "auth", \ + "auth response", \ + "\tAuthenticate.", \ + 1, 1 + +#define CLI_PANIC_SHOW \ + "panic.show", \ + "panic.show", \ + "\tReturn the last panic, if any.", \ + 0, 0 + +#define CLI_PANIC_CLEAR \ + "panic.clear", \ + "panic.clear", \ + "\tClear the last panic, if any.", \ + 0, 0 + +/* + * Status/return codes in the CLI protocol + */ + +enum VCLI_status_e { + CLIS_SYNTAX = 100, + CLIS_UNKNOWN = 101, + CLIS_UNIMPL = 102, + CLIS_TOOFEW = 104, + CLIS_TOOMANY = 105, + CLIS_PARAM = 106, + CLIS_AUTH = 107, + CLIS_OK = 200, + CLIS_CANT = 300, + CLIS_COMMS = 400, + CLIS_CLOSE = 500 +}; + +/* Length of first line of response */ +#define CLI_LINE0_LEN 13 +#define CLI_AUTH_RESPONSE_LEN 64 /* 64 hex + NUL */ + +#if !defined(VCLI_PROTOCOL_ONLY) +/* Convenience functions exported in libvarnishapi */ +int VCLI_WriteResult(int fd, unsigned status, const char *result); +int VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo); +void VCLI_AuthResponse(int S_fd, const char *challenge, + char reponse[CLI_AUTH_RESPONSE_LEN + 1]); +#endif diff --git a/lib/libvarnish/cli_auth.c b/lib/libvarnish/cli_auth.c index 35d2ad6..fc66fa7 100644 --- a/lib/libvarnish/cli_auth.c +++ b/lib/libvarnish/cli_auth.c @@ -32,8 +32,7 @@ #include #include -#include "cli.h" -#include "cli_common.h" +#include "vcli.h" #include "libvarnish.h" #include "vsha256.h" diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index 7b6c43a..604ab15 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -46,7 +46,7 @@ #include "libvarnish.h" -#include "cli.h" +#include "vcli.h" #include "cli_priv.h" #include "cli_common.h" diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index 621f184..dc4a89b 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include From phk at varnish-cache.org Mon Jun 6 08:54:08 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 10:54:08 +0200 Subject: [master] c913f8c Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit c913f8cf59f029e76605b3662694ccd1484a4692 Merge: d5015d7 a9e6e96 Author: Poul-Henning Kamp Date: Mon Jun 6 08:54:05 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From tfheen at varnish-cache.org Mon Jun 6 09:01:19 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 11:01:19 +0200 Subject: [master] 96c3600 Add base64 prototypes too Message-ID: commit 96c3600d9c70fadd6919b7bd7c046f5d202df5f1 Author: Tollef Fog Heen Date: Mon Jun 6 11:00:52 2011 +0200 Add base64 prototypes too diff --git a/bin/varnishncsa/Makefile.am b/bin/varnishncsa/Makefile.am index f7f4d56..e1baa79 100644 --- a/bin/varnishncsa/Makefile.am +++ b/bin/varnishncsa/Makefile.am @@ -9,6 +9,7 @@ dist_man_MANS = varnishncsa.1 varnishncsa_SOURCES = \ varnishncsa.c \ base64.c \ + base64.h \ $(top_builddir)/lib/libvarnish/flopen.c \ $(top_builddir)/lib/libvarnish/vpf.c diff --git a/bin/varnishncsa/base64.c b/bin/varnishncsa/base64.c index 4ff88ce..23dae14 100644 --- a/bin/varnishncsa/base64.c +++ b/bin/varnishncsa/base64.c @@ -8,6 +8,7 @@ #include #include "varnishapi.h" +#include "base64.h" static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/bin/varnishncsa/base64.h b/bin/varnishncsa/base64.h new file mode 100644 index 0000000..31b166c --- /dev/null +++ b/bin/varnishncsa/base64.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006-2011 Varnish Software AS + * All rights reserved. + * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +void VB64_init(void); +int VB64_decode(char *d, unsigned dlen, const char *s); diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index d53ddbc..89c1ee1 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -77,6 +77,7 @@ #include "vsl.h" #include "vre.h" #include "varnishapi.h" +#include "base64.h" static volatile sig_atomic_t reopen; From phk at varnish-cache.org Mon Jun 6 09:04:57 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 06 Jun 2011 11:04:57 +0200 Subject: [master] 25ef249 Remove unnecessary #includes Message-ID: commit 25ef24962e12d57b12c3daa29623be60cc77b738 Author: Poul-Henning Kamp Date: Mon Jun 6 09:04:48 2011 +0000 Remove unnecessary #includes diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c index 6d27ce5..6f06c2c 100644 --- a/lib/libvmod_std/vmod_std_conversions.c +++ b/lib/libvmod_std/vmod_std_conversions.c @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include "../../bin/varnishd/cache.h" From tfheen at varnish-cache.org Mon Jun 6 10:26:06 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 12:26:06 +0200 Subject: [master] f435e46 Rename vcs_version.c to vcs_version.h Message-ID: commit f435e460de6d0307e990ba8ff5a83f5173c52b55 Author: Tollef Fog Heen Date: Mon Jun 6 12:06:04 2011 +0200 Rename vcs_version.c to vcs_version.h Adjust build system accordingly. diff --git a/.gitignore b/.gitignore index 922414b..06624b1 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,7 @@ TAGS /include/vcl_returns.h /include/vrt_obj.h /include/vrt_stv_var.h -/lib/libvarnish/vcs_version.c +/lib/libvarnish/vcs_version.h /lib/libvcl/vcc_fixed_token.c /lib/libvcl/vcc_obj.c /lib/libvcl/vcc_token_defs.h diff --git a/lib/libvarnish/Makefile.am b/lib/libvarnish/Makefile.am index 584a4c3..4949610 100644 --- a/lib/libvarnish/Makefile.am +++ b/lib/libvarnish/Makefile.am @@ -14,7 +14,7 @@ libvarnish_la_SOURCES = \ cli_serve.c \ flopen.c \ num.c \ - vcs_version.c \ + vcs_version.h \ time.c \ tcp.c \ vct.c \ @@ -33,11 +33,13 @@ libvarnish_la_SOURCES = \ libvarnish_la_CFLAGS = -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} @PCRE_LIBS@ -DISTCLEANFILES = vcs_version.c -vcs_version.c: FORCE +version.o: vcs_version.h + +DISTCLEANFILES = vcs_version.h +vcs_version.h: FORCE if [ -d "$(top_srcdir)/.git" ]; then \ V="$$(git describe --always)" \ - H="$$(head -n 1 vcs_version.c 2>/dev/null || true)"; \ + H="$$(head -n 1 vcs_version.h 2>/dev/null || true)"; \ if [ "/* $$V */" != "$$H" ]; then \ ( \ echo "/* $$V */" ;\ @@ -48,12 +50,8 @@ vcs_version.c: FORCE echo ' *' ;\ echo ' */' ;\ echo '' ;\ - echo "#include " ;\ - echo "const char* VCS_Version(void)" ;\ - echo "{" ;\ - echo " return (\"$$V\");" ;\ - echo "}" ;\ - ) > vcs_version.c ; \ + echo "#define VCS_Version \"$$V\"" \ + ) > vcs_version.h ; \ fi \ fi FORCE: diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index 070a056..014eda4 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -34,12 +34,13 @@ #include #include "libvarnish.h" +#include "vcs_version.h" void VCS_Message(const char *progname) { fprintf(stderr, "%s (%s-%s revision %s)\n", progname, - PACKAGE_TARNAME, PACKAGE_VERSION, VCS_Version()); + PACKAGE_TARNAME, PACKAGE_VERSION, VCS_Version); fprintf(stderr, "Copyright (c) 2006 Verdens Gang AS\n"); fprintf(stderr, "Copyright (c) 2006-2011 Varnish Software AS\n"); } diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am index e30c400..165a726 100644 --- a/lib/libvarnishapi/Makefile.am +++ b/lib/libvarnishapi/Makefile.am @@ -12,7 +12,7 @@ libvarnishapi_la_SOURCES = \ \ ../libvarnish/assert.c \ ../libvarnish/argv.c \ - ../libvarnish/vcs_version.c \ + ../libvarnish/vcs_version.h \ ../libvarnish/version.c \ ../libvarnish/cli_common.c \ ../libvarnish/cli_auth.c \ From tfheen at varnish-cache.org Mon Jun 6 10:26:08 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 12:26:08 +0200 Subject: [master] b85574d Explicitly link version.c where it's needed. Message-ID: commit b85574d61e0133aa6ecbe12d61af27267ce4c89d Author: Tollef Fog Heen Date: Mon Jun 6 12:24:59 2011 +0200 Explicitly link version.c where it's needed. The various tools need version.c from libvarnish, so make that part of the build directly. diff --git a/bin/varnishhist/Makefile.am b/bin/varnishhist/Makefile.am index 8300e43..f187bb7 100644 --- a/bin/varnishhist/Makefile.am +++ b/bin/varnishhist/Makefile.am @@ -6,7 +6,8 @@ bin_PROGRAMS = varnishhist dist_man_MANS = varnishhist.1 -varnishhist_SOURCES = varnishhist.c +varnishhist_SOURCES = varnishhist.c \ + $(top_builddir)/lib/libvarnish/version.c varnishhist_LDADD = \ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \ diff --git a/bin/varnishlog/Makefile.am b/bin/varnishlog/Makefile.am index 1a359f7..2c7cb6f 100644 --- a/bin/varnishlog/Makefile.am +++ b/bin/varnishlog/Makefile.am @@ -9,6 +9,7 @@ dist_man_MANS = varnishlog.1 varnishlog_SOURCES = \ varnishlog.c \ $(top_builddir)/lib/libvarnish/flopen.c \ + $(top_builddir)/lib/libvarnish/version.c \ $(top_builddir)/lib/libvarnish/vpf.c varnishlog_LDADD = \ diff --git a/bin/varnishncsa/Makefile.am b/bin/varnishncsa/Makefile.am index e1baa79..cd4962e 100644 --- a/bin/varnishncsa/Makefile.am +++ b/bin/varnishncsa/Makefile.am @@ -11,6 +11,7 @@ varnishncsa_SOURCES = \ base64.c \ base64.h \ $(top_builddir)/lib/libvarnish/flopen.c \ + $(top_builddir)/lib/libvarnish/version.c \ $(top_builddir)/lib/libvarnish/vpf.c varnishncsa_LDADD = \ diff --git a/bin/varnishsizes/Makefile.am b/bin/varnishsizes/Makefile.am index cb0c013..727081a 100644 --- a/bin/varnishsizes/Makefile.am +++ b/bin/varnishsizes/Makefile.am @@ -6,7 +6,8 @@ bin_PROGRAMS = varnishsizes dist_man_MANS = varnishsizes.1 -varnishsizes_SOURCES = varnishsizes.c +varnishsizes_SOURCES = varnishsizes.c \ + $(top_builddir)/lib/libvarnish/version.c varnishsizes_LDADD = \ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \ diff --git a/bin/varnishstat/Makefile.am b/bin/varnishstat/Makefile.am index ae4da56..d5122ed 100644 --- a/bin/varnishstat/Makefile.am +++ b/bin/varnishstat/Makefile.am @@ -10,7 +10,8 @@ varnishstat_SOURCES = \ varnishstat.h \ \ varnishstat.c \ - varnishstat_curses.c + varnishstat_curses.c \ + $(top_builddir)/lib/libvarnish/version.c varnishstat_LDADD = \ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \ diff --git a/bin/varnishtop/Makefile.am b/bin/varnishtop/Makefile.am index 200ed96..811a97e 100644 --- a/bin/varnishtop/Makefile.am +++ b/bin/varnishtop/Makefile.am @@ -6,7 +6,8 @@ bin_PROGRAMS = varnishtop dist_man_MANS = varnishtop.1 -varnishtop_SOURCES = varnishtop.c +varnishtop_SOURCES = varnishtop.c \ + $(top_builddir)/lib/libvarnish/version.c varnishtop_LDADD = \ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \ From tfheen at varnish-cache.org Mon Jun 6 11:25:08 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 13:25:08 +0200 Subject: [master] ed48ef9 Add missing assert.c inclusion for tools Message-ID: commit ed48ef91c4b5b784633d46af1547e13ed129a2d5 Author: Tollef Fog Heen Date: Mon Jun 6 13:12:38 2011 +0200 Add missing assert.c inclusion for tools diff --git a/bin/varnishadm/Makefile.am b/bin/varnishadm/Makefile.am index 3ab6f03..93997b9 100644 --- a/bin/varnishadm/Makefile.am +++ b/bin/varnishadm/Makefile.am @@ -8,6 +8,7 @@ dist_man_MANS = varnishadm.1 varnishadm_SOURCES = \ varnishadm.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/tcp.c \ $(top_builddir)/lib/libvarnish/vss.c diff --git a/bin/varnishhist/Makefile.am b/bin/varnishhist/Makefile.am index f187bb7..8f19313 100644 --- a/bin/varnishhist/Makefile.am +++ b/bin/varnishhist/Makefile.am @@ -7,6 +7,7 @@ bin_PROGRAMS = varnishhist dist_man_MANS = varnishhist.1 varnishhist_SOURCES = varnishhist.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/version.c varnishhist_LDADD = \ diff --git a/bin/varnishlog/Makefile.am b/bin/varnishlog/Makefile.am index 2c7cb6f..2a5bb26 100644 --- a/bin/varnishlog/Makefile.am +++ b/bin/varnishlog/Makefile.am @@ -8,6 +8,7 @@ dist_man_MANS = varnishlog.1 varnishlog_SOURCES = \ varnishlog.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/flopen.c \ $(top_builddir)/lib/libvarnish/version.c \ $(top_builddir)/lib/libvarnish/vpf.c diff --git a/bin/varnishncsa/Makefile.am b/bin/varnishncsa/Makefile.am index cd4962e..f34a0e2 100644 --- a/bin/varnishncsa/Makefile.am +++ b/bin/varnishncsa/Makefile.am @@ -10,6 +10,7 @@ varnishncsa_SOURCES = \ varnishncsa.c \ base64.c \ base64.h \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/flopen.c \ $(top_builddir)/lib/libvarnish/version.c \ $(top_builddir)/lib/libvarnish/vpf.c diff --git a/bin/varnishreplay/Makefile.am b/bin/varnishreplay/Makefile.am index 38c8be9..553dfda 100644 --- a/bin/varnishreplay/Makefile.am +++ b/bin/varnishreplay/Makefile.am @@ -8,6 +8,7 @@ dist_man_MANS = varnishreplay.1 varnishreplay_SOURCES = \ varnishreplay.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/tcp.c \ $(top_builddir)/lib/libvarnish/vss.c diff --git a/bin/varnishsizes/Makefile.am b/bin/varnishsizes/Makefile.am index 727081a..a25b280 100644 --- a/bin/varnishsizes/Makefile.am +++ b/bin/varnishsizes/Makefile.am @@ -7,6 +7,7 @@ bin_PROGRAMS = varnishsizes dist_man_MANS = varnishsizes.1 varnishsizes_SOURCES = varnishsizes.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/version.c varnishsizes_LDADD = \ diff --git a/bin/varnishstat/Makefile.am b/bin/varnishstat/Makefile.am index d5122ed..8407eb2 100644 --- a/bin/varnishstat/Makefile.am +++ b/bin/varnishstat/Makefile.am @@ -11,6 +11,7 @@ varnishstat_SOURCES = \ \ varnishstat.c \ varnishstat_curses.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/version.c varnishstat_LDADD = \ diff --git a/bin/varnishtop/Makefile.am b/bin/varnishtop/Makefile.am index 811a97e..dab412f 100644 --- a/bin/varnishtop/Makefile.am +++ b/bin/varnishtop/Makefile.am @@ -7,6 +7,7 @@ bin_PROGRAMS = varnishtop dist_man_MANS = varnishtop.1 varnishtop_SOURCES = varnishtop.c \ + $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/version.c varnishtop_LDADD = \ From tfheen at varnish-cache.org Mon Jun 6 11:25:08 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 13:25:08 +0200 Subject: [master] 6d95f94 Mark vcs_version.h as a BUILT_SOURCE Message-ID: commit 6d95f94a896723c17f82807e0661903da5edb5a8 Author: Tollef Fog Heen Date: Mon Jun 6 13:14:33 2011 +0200 Mark vcs_version.h as a BUILT_SOURCE This should work around build problems Also mark vcs_version.h as a maintainer built file, not a configure-built file. diff --git a/lib/libvarnish/Makefile.am b/lib/libvarnish/Makefile.am index 4949610..68d0ac3 100644 --- a/lib/libvarnish/Makefile.am +++ b/lib/libvarnish/Makefile.am @@ -33,9 +33,8 @@ libvarnish_la_SOURCES = \ libvarnish_la_CFLAGS = -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} @PCRE_LIBS@ -version.o: vcs_version.h - -DISTCLEANFILES = vcs_version.h +BUILT_SOURCES = vcs_version.h +MAINTAINERCLEANFILES = vcs_version.h vcs_version.h: FORCE if [ -d "$(top_srcdir)/.git" ]; then \ V="$$(git describe --always)" \ From tfheen at varnish-cache.org Mon Jun 6 11:25:08 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 13:25:08 +0200 Subject: [master] 5cdf258 Update .gitignore file Message-ID: commit 5cdf2583203129c2eed35637fa99732496002e55 Author: Tollef Fog Heen Date: Mon Jun 6 13:25:04 2011 +0200 Update .gitignore file diff --git a/.gitignore b/.gitignore index 06624b1..095ca12 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ Makefile.in /config.status /config.sub /configure +/configure.lineno /depcomp /install-sh /libtool @@ -54,6 +55,7 @@ TAGS # Man-files and binaries /man/vcl.7 +/man/varnish-cli.7 /bin/varnishadm/varnishadm /bin/varnishadm/varnishadm.1 /bin/varnishd/varnishd @@ -74,7 +76,9 @@ TAGS /bin/varnishtest/varnishtest.1 /bin/varnishtop/varnishtop /bin/varnishtop/varnishtop.1 +/lib/libvmod_std/vmod_std.3 # Doc-stuff generated from xml /doc/*.html /doc/sphinx/=build/ +/doc/sphinx/conf.py From tfheen at varnish-cache.org Mon Jun 6 11:32:28 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 13:32:28 +0200 Subject: [master] f4347dc varnishlog needs vsb.c Message-ID: commit f4347dcdfbd30351df063f95428cb539147b3456 Author: Tollef Fog Heen Date: Mon Jun 6 13:27:55 2011 +0200 varnishlog needs vsb.c diff --git a/bin/varnishlog/Makefile.am b/bin/varnishlog/Makefile.am index 2a5bb26..79bf2ad 100644 --- a/bin/varnishlog/Makefile.am +++ b/bin/varnishlog/Makefile.am @@ -11,6 +11,7 @@ varnishlog_SOURCES = \ $(top_builddir)/lib/libvarnish/assert.c \ $(top_builddir)/lib/libvarnish/flopen.c \ $(top_builddir)/lib/libvarnish/version.c \ + $(top_builddir)/lib/libvarnish/vsb.c \ $(top_builddir)/lib/libvarnish/vpf.c varnishlog_LDADD = \ From tfheen at varnish-cache.org Mon Jun 6 12:01:08 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 14:01:08 +0200 Subject: [master] bbb1d1a just grab the commit hash for the revision information Message-ID: commit bbb1d1a34700c0b6bc26746c98bca6250147585d Author: Tollef Fog Heen Date: Tue May 31 10:16:07 2011 +0200 just grab the commit hash for the revision information diff --git a/lib/libvarnish/Makefile.am b/lib/libvarnish/Makefile.am index 68d0ac3..a5ebc5c 100644 --- a/lib/libvarnish/Makefile.am +++ b/lib/libvarnish/Makefile.am @@ -37,7 +37,7 @@ BUILT_SOURCES = vcs_version.h MAINTAINERCLEANFILES = vcs_version.h vcs_version.h: FORCE if [ -d "$(top_srcdir)/.git" ]; then \ - V="$$(git describe --always)" \ + V="$$(git show -s --pretty=format:%h)" \ H="$$(head -n 1 vcs_version.h 2>/dev/null || true)"; \ if [ "/* $$V */" != "$$H" ]; then \ ( \ From tfheen at varnish-cache.org Mon Jun 6 12:01:14 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 06 Jun 2011 14:01:14 +0200 Subject: [master] 57ffb88 Implement symbol versioning Message-ID: commit 57ffb888eb1bbec268df189d42926b7b5da26a5d Author: Tollef Fog Heen Date: Mon Jun 6 13:47:28 2011 +0200 Implement symbol versioning Restrict visibility of symbols to the symbols we actually want to be public. diff --git a/configure.ac b/configure.ac index 9087625..0f3d0ce 100644 --- a/configure.ac +++ b/configure.ac @@ -441,6 +441,10 @@ AC_SUBST(VARNISH_STATE_DIR) # Default configuration directory. varnishconfdir='${sysconfdir}/varnish' AC_SUBST(varnishconfdir) + +# Check for linker script support +gl_LD_VERSION_SCRIPT + # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am index 165a726..a646f76 100644 --- a/lib/libvarnishapi/Makefile.am +++ b/lib/libvarnishapi/Makefile.am @@ -24,9 +24,16 @@ libvarnishapi_la_SOURCES = \ vsm.c \ vsl_arg.c \ vsl.c \ - vsc.c + vsc.c \ + libvarnishapi.map libvarnishapi_la_CFLAGS = \ -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' libvarnishapi_la_LIBADD = @PCRE_LIBS@ + +if HAVE_LD_VERSION_SCRIPT +libvarnishapi_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libvarnishapi.map +else +libvarnishapi_la_LDFLAGS += -export-symbols-regex '^V' +endif diff --git a/lib/libvarnishapi/libvarnishapi.map b/lib/libvarnishapi/libvarnishapi.map new file mode 100644 index 0000000..4df8577 --- /dev/null +++ b/lib/libvarnishapi/libvarnishapi.map @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2011 Varnish Software AS + * All rights reserved. + * + * Author: Tollef Fog Heen + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +LIBVARNISHAPI_1.0 { + global: + # Functions + VSM_New; + VSM_Diag; + VSM_n_Arg; + VSM_Name; + VSM_Delete; + VSM_Open; + VSM_ReOpen; + VSM_Seq; + VSM_Head; + VSM_Find_Chunk; + VSM_Close; + VSM_iter0; + VSM_intern; + + VSC_Setup; + VSC_Arg; + VSC_Open; + VSC_Main; + VSC_Iter; + + VSL_Setup; + VSL_Open; + VSL_Arg; + VSL_H_Print; + VSL_Select; + VSL_NonBlocking; + VSL_Dispatch; + VSL_NextLog; + VSL_Matched; + + VCLI_WriteResult; + VCLI_ReadResult; + VCLI_AuthResponse; + + # Variables + VSL_tags; + local: + *; +}; diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4 new file mode 100644 index 0000000..a97888f --- /dev/null +++ b/m4/ld-version-script.m4 @@ -0,0 +1,44 @@ +# ld-version-script.m4 serial 1 +dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# FIXME: The test below returns a false positive for mingw +# cross-compiles, 'local:' statements does not reduce number of +# exported symbols in a DLL. Use --disable-ld-version-script to work +# around the problem. + +# gl_LD_VERSION_SCRIPT +# -------------------- +# Check if LD supports linker scripts, and define automake conditional +# HAVE_LD_VERSION_SCRIPT if so. +AC_DEFUN([gl_LD_VERSION_SCRIPT], +[ + AC_ARG_ENABLE([ld-version-script], + AS_HELP_STRING([--enable-ld-version-script], + [enable linker version script (default is enabled when possible)]), + [have_ld_version_script=$enableval], []) + if test -z "$have_ld_version_script"; then + AC_MSG_CHECKING([if LD -Wl,--version-script works]) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + cat > conftest.map < commit edd0d11803810d30566c883a9b6d1fcbdc12b69f Author: Martin Blix Grydeland Date: Mon Jun 6 14:53:35 2011 +0200 Give libtool hints about this library is dl-opened at runtime like a module. diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am index 49699cb..c9979fa 100644 --- a/lib/libvmod_std/Makefile.am +++ b/lib/libvmod_std/Makefile.am @@ -7,7 +7,7 @@ dist_man_MANS = vmod_std.3 vmoddir = $(pkglibdir)/vmods vmod_LTLIBRARIES = libvmod_std.la -libvmod_std_la_LDFLAGS = -avoid-version +libvmod_std_la_LDFLAGS = -module -export-dynamic -avoid-version libvmod_std_la_SOURCES = \ vcc_if.c \ From martin at varnish-cache.org Tue Jun 7 08:05:42 2011 From: martin at varnish-cache.org (Martin Blix Grydeland) Date: Tue, 07 Jun 2011 10:05:42 +0200 Subject: [master] e2ef91e Register an atexit handler that clears the master pid from the shmlog at exit. Message-ID: commit e2ef91e9587b4662d2f982aed9cc69f1fc236b4c Author: Martin Blix Grydeland Date: Tue Jun 7 09:51:15 2011 +0200 Register an atexit handler that clears the master pid from the shmlog at exit. diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c index ceb5e7f..f28bc9b 100644 --- a/bin/varnishd/mgt_shmem.c +++ b/bin/varnishd/mgt_shmem.c @@ -193,6 +193,18 @@ vsl_buildnew(const char *fn, unsigned size, int fill) AZ(ftruncate(vsl_fd, (off_t)size)); } +/*-------------------------------------------------------------------- + * Exit handler that clears the owning pid from the SHMLOG + */ + +static +void +mgt_shm_atexit(void) +{ + if (getpid() == VSM_head->master_pid) + VSM_head->master_pid = 0; +} + void mgt_SHM_Init(const char *l_arg) { @@ -273,6 +285,7 @@ mgt_SHM_Init(const char *l_arg) MAP_HASSEMAPHORE | MAP_NOSYNC | MAP_SHARED, vsl_fd, 0); VSM_head->master_pid = getpid(); + AZ(atexit(mgt_shm_atexit)); xxxassert(VSM_head != MAP_FAILED); (void)mlock((void*)VSM_head, size); From tfheen at varnish-cache.org Tue Jun 7 10:55:56 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 07 Jun 2011 12:55:56 +0200 Subject: [master] 471a964 Update changes file for 3.0 beta 2 Message-ID: commit 471a9642083470f7275c899e5aa740b0af0f3b40 Author: Tollef Fog Heen Date: Tue May 31 10:29:19 2011 +0200 Update changes file for 3.0 beta 2 diff --git a/doc/changes.rst b/doc/changes.rst index 780b882..d08537c 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,3 +1,54 @@ +===================================== +Changes from 3.0 beta 1 to 3.0 beta 2 +===================================== + +Varnishd +-------- + +- thread_pool_min and thread_pool_max now each refer to the number of + threads per pool, rather than being inconsistent as they were + before. + +- 307 Temporary redirect is now considered cacheable. `Bug #908`_. + +- The `stats` command has been removed from the CLI interface. With + the new counters, it would mean implementing more and more of + varnishstat in the master CLI process and the CLI is + single-threaded so we do not want to do this work there in the first + place. Use varnishstat instead. + +.. _bug #908: http://varnish-cache.org/trac/ticket/908 + +VCL +--- + +- VCL now treats null arguments (unset headers for instance) as empty + strings. `Bug #913`_. + +- VCL now has vcl_init and vcl_fini functions that are called when a + given VCL has been loaded and unloaded. + +- There is no longer any interpolation of the right hand side in bans + where the ban is a single string. This was confusing and you now + have to make sure bits are inside or outside string context as + appropriate. + +- Varnish is now stricter in enforcing no duplication of probes, + backends and ACLs. + +.. _bug #913: http://varnish-cache.org/trac/ticket/913 + +varnishncsa +----------- + +- varnishncsa now ignores piped requests, since we have no way of + knowing their return status. + +VMODs +----- + +- The std module now has proper documentation, including a manual page + ================================ Changes from 2.1.5 to 3.0 beta 1 ================================ From tfheen at varnish-cache.org Tue Jun 7 10:56:01 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 07 Jun 2011 12:56:01 +0200 Subject: [master] 1490fe0 Update spec file for 3.0 beta 2 Message-ID: commit 1490fe0627f698e3b66cda5e05126b7f665ee451 Author: Tollef Fog Heen Date: Tue May 31 10:30:01 2011 +0200 Update spec file for 3.0 beta 2 diff --git a/redhat/varnish.spec b/redhat/varnish.spec index da604bb..7fc5a7a 100644 --- a/redhat/varnish.spec +++ b/redhat/varnish.spec @@ -1,12 +1,12 @@ Summary: High-performance HTTP accelerator Name: varnish Version: 3.0.0 -Release: 0.beta1%{?dist} +Release: 0.beta2%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.varnish-cache.org/ #Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz -Source0: %{name}-3.0.0-beta1.tar.gz +Source0: %{name}-3.0.0-beta2.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To build from git, start with a make dist, see redhat/README.redhat # You will need at least automake autoconf libtool python-docutils @@ -72,7 +72,7 @@ Documentation files for %name %prep #%setup -q -%setup -q -n varnish-3.0.0-beta1 +%setup -q -n varnish-3.0.0-beta2 mkdir examples cp bin/varnishd/default.vcl etc/zope-plone.vcl examples From tfheen at varnish-cache.org Tue Jun 7 10:56:05 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 07 Jun 2011 12:56:05 +0200 Subject: [master] a6d07c0 Update configure.ac for beta 2 Message-ID: commit a6d07c01f1411400bb4a75b9a809bd0f14361dbb Author: Tollef Fog Heen Date: Tue Jun 7 10:12:59 2011 +0200 Update configure.ac for beta 2 diff --git a/configure.ac b/configure.ac index 0f3d0ce..57287f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [3.0.0-beta1], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [3.0.0-beta2], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From tfheen at varnish-cache.org Tue Jun 7 12:19:34 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 07 Jun 2011 14:19:34 +0200 Subject: [master] 01ad19e Fix typos in docs Message-ID: commit 01ad19ef137c99a585cc02d8ae0ec223d55448a9 Author: Tollef Fog Heen Date: Tue Jun 7 14:19:02 2011 +0200 Fix typos in docs Thanks to Chris Davies for spotting them. diff --git a/doc/sphinx/tutorial/purging.rst b/doc/sphinx/tutorial/purging.rst index bd00e49..99f3f77 100644 --- a/doc/sphinx/tutorial/purging.rst +++ b/doc/sphinx/tutorial/purging.rst @@ -97,12 +97,12 @@ You can also add bans to Varnish via HTTP. Doing so requires a bit of VCL:: if (!client.ip ~ purge) { error 405 "Not allowed."; } - ban("req.http.host == " req.http.host - "&& req.url == " req.url); + ban("req.http.host == " + req.http.host + + "&& req.url == " + req.url); # Throw a synthetic page so the # request won't go to the backend. - error 200 "Ban added" + error 200 "Ban added"; } } From tfheen at varnish-cache.org Wed Jun 8 07:40:55 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 08 Jun 2011 09:40:55 +0200 Subject: [master] 7b1006d Reset RES_CHUNKED if we are not sending a body Message-ID: commit 7b1006deafce07616f33cff747d04a46c34b72ff Author: Tollef Fog Heen Date: Wed Jun 8 09:39:32 2011 +0200 Reset RES_CHUNKED if we are not sending a body We were accidentially sending an end-chunk in some cases where a response was bodyless such as for 304s. diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 4b4b46b..f52eb4b 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -365,6 +365,9 @@ RES_WriteObj(struct sess *sp) sp->acct_tmp.hdrbytes += http_Write(sp->wrk, sp->wrk->resp, 1); + if (!sp->wantbody) + sp->wrk->res_mode &= ~RES_CHUNKED; + if (sp->wrk->res_mode & RES_CHUNKED) WRW_Chunked(sp->wrk); From geoff at varnish-cache.org Wed Jun 8 12:10:42 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:10:42 +0200 Subject: [experimental-ims] e2ef91e Register an atexit handler that clears the master pid from the shmlog at exit. Message-ID: commit e2ef91e9587b4662d2f982aed9cc69f1fc236b4c Author: Martin Blix Grydeland Date: Tue Jun 7 09:51:15 2011 +0200 Register an atexit handler that clears the master pid from the shmlog at exit. diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c index ceb5e7f..f28bc9b 100644 --- a/bin/varnishd/mgt_shmem.c +++ b/bin/varnishd/mgt_shmem.c @@ -193,6 +193,18 @@ vsl_buildnew(const char *fn, unsigned size, int fill) AZ(ftruncate(vsl_fd, (off_t)size)); } +/*-------------------------------------------------------------------- + * Exit handler that clears the owning pid from the SHMLOG + */ + +static +void +mgt_shm_atexit(void) +{ + if (getpid() == VSM_head->master_pid) + VSM_head->master_pid = 0; +} + void mgt_SHM_Init(const char *l_arg) { @@ -273,6 +285,7 @@ mgt_SHM_Init(const char *l_arg) MAP_HASSEMAPHORE | MAP_NOSYNC | MAP_SHARED, vsl_fd, 0); VSM_head->master_pid = getpid(); + AZ(atexit(mgt_shm_atexit)); xxxassert(VSM_head != MAP_FAILED); (void)mlock((void*)VSM_head, size); From geoff at varnish-cache.org Wed Jun 8 12:10:45 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:10:45 +0200 Subject: [experimental-ims] 471a964 Update changes file for 3.0 beta 2 Message-ID: commit 471a9642083470f7275c899e5aa740b0af0f3b40 Author: Tollef Fog Heen Date: Tue May 31 10:29:19 2011 +0200 Update changes file for 3.0 beta 2 diff --git a/doc/changes.rst b/doc/changes.rst index 780b882..d08537c 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,3 +1,54 @@ +===================================== +Changes from 3.0 beta 1 to 3.0 beta 2 +===================================== + +Varnishd +-------- + +- thread_pool_min and thread_pool_max now each refer to the number of + threads per pool, rather than being inconsistent as they were + before. + +- 307 Temporary redirect is now considered cacheable. `Bug #908`_. + +- The `stats` command has been removed from the CLI interface. With + the new counters, it would mean implementing more and more of + varnishstat in the master CLI process and the CLI is + single-threaded so we do not want to do this work there in the first + place. Use varnishstat instead. + +.. _bug #908: http://varnish-cache.org/trac/ticket/908 + +VCL +--- + +- VCL now treats null arguments (unset headers for instance) as empty + strings. `Bug #913`_. + +- VCL now has vcl_init and vcl_fini functions that are called when a + given VCL has been loaded and unloaded. + +- There is no longer any interpolation of the right hand side in bans + where the ban is a single string. This was confusing and you now + have to make sure bits are inside or outside string context as + appropriate. + +- Varnish is now stricter in enforcing no duplication of probes, + backends and ACLs. + +.. _bug #913: http://varnish-cache.org/trac/ticket/913 + +varnishncsa +----------- + +- varnishncsa now ignores piped requests, since we have no way of + knowing their return status. + +VMODs +----- + +- The std module now has proper documentation, including a manual page + ================================ Changes from 2.1.5 to 3.0 beta 1 ================================ From geoff at varnish-cache.org Wed Jun 8 12:10:49 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:10:49 +0200 Subject: [experimental-ims] 1490fe0 Update spec file for 3.0 beta 2 Message-ID: commit 1490fe0627f698e3b66cda5e05126b7f665ee451 Author: Tollef Fog Heen Date: Tue May 31 10:30:01 2011 +0200 Update spec file for 3.0 beta 2 diff --git a/redhat/varnish.spec b/redhat/varnish.spec index da604bb..7fc5a7a 100644 --- a/redhat/varnish.spec +++ b/redhat/varnish.spec @@ -1,12 +1,12 @@ Summary: High-performance HTTP accelerator Name: varnish Version: 3.0.0 -Release: 0.beta1%{?dist} +Release: 0.beta2%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.varnish-cache.org/ #Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz -Source0: %{name}-3.0.0-beta1.tar.gz +Source0: %{name}-3.0.0-beta2.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To build from git, start with a make dist, see redhat/README.redhat # You will need at least automake autoconf libtool python-docutils @@ -72,7 +72,7 @@ Documentation files for %name %prep #%setup -q -%setup -q -n varnish-3.0.0-beta1 +%setup -q -n varnish-3.0.0-beta2 mkdir examples cp bin/varnishd/default.vcl etc/zope-plone.vcl examples From geoff at varnish-cache.org Wed Jun 8 12:10:52 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:10:52 +0200 Subject: [experimental-ims] a6d07c0 Update configure.ac for beta 2 Message-ID: commit a6d07c01f1411400bb4a75b9a809bd0f14361dbb Author: Tollef Fog Heen Date: Tue Jun 7 10:12:59 2011 +0200 Update configure.ac for beta 2 diff --git a/configure.ac b/configure.ac index 0f3d0ce..57287f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [3.0.0-beta1], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [3.0.0-beta2], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From geoff at varnish-cache.org Wed Jun 8 12:10:58 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:10:58 +0200 Subject: [experimental-ims] faa7c18 Merge ssh://git.varnish-cache.org/git/varnish-cache into experimental-ims Message-ID: commit faa7c18ad95602f903115bea60dd43063f7c11c8 Merge: e707094 e2ef91e Author: Geoff Simmons Date: Tue Jun 7 11:30:01 2011 +0200 Merge ssh://git.varnish-cache.org/git/varnish-cache into experimental-ims From geoff at varnish-cache.org Wed Jun 8 12:11:01 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:11:01 +0200 Subject: [experimental-ims] 06b142f Merge branch 'HEAD', remote branch 'origin' into experimental-ims Message-ID: commit 06b142f8230b660748f9fa4797b911381882881d Merge: faa7c18 a6d07c0 Author: Geoff Simmons Date: Tue Jun 7 14:03:02 2011 +0200 Merge branch 'HEAD', remote branch 'origin' into experimental-ims From geoff at varnish-cache.org Wed Jun 8 12:11:04 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:11:04 +0200 Subject: [experimental-ims] 01ad19e Fix typos in docs Message-ID: commit 01ad19ef137c99a585cc02d8ae0ec223d55448a9 Author: Tollef Fog Heen Date: Tue Jun 7 14:19:02 2011 +0200 Fix typos in docs Thanks to Chris Davies for spotting them. diff --git a/doc/sphinx/tutorial/purging.rst b/doc/sphinx/tutorial/purging.rst index bd00e49..99f3f77 100644 --- a/doc/sphinx/tutorial/purging.rst +++ b/doc/sphinx/tutorial/purging.rst @@ -97,12 +97,12 @@ You can also add bans to Varnish via HTTP. Doing so requires a bit of VCL:: if (!client.ip ~ purge) { error 405 "Not allowed."; } - ban("req.http.host == " req.http.host - "&& req.url == " req.url); + ban("req.http.host == " + req.http.host + + "&& req.url == " + req.url); # Throw a synthetic page so the # request won't go to the backend. - error 200 "Ban added" + error 200 "Ban added"; } } From geoff at varnish-cache.org Wed Jun 8 12:11:08 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:11:08 +0200 Subject: [experimental-ims] 7b1006d Reset RES_CHUNKED if we are not sending a body Message-ID: commit 7b1006deafce07616f33cff747d04a46c34b72ff Author: Tollef Fog Heen Date: Wed Jun 8 09:39:32 2011 +0200 Reset RES_CHUNKED if we are not sending a body We were accidentially sending an end-chunk in some cases where a response was bodyless such as for 304s. diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 4b4b46b..f52eb4b 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -365,6 +365,9 @@ RES_WriteObj(struct sess *sp) sp->acct_tmp.hdrbytes += http_Write(sp->wrk, sp->wrk->resp, 1); + if (!sp->wantbody) + sp->wrk->res_mode &= ~RES_CHUNKED; + if (sp->wrk->res_mode & RES_CHUNKED) WRW_Chunked(sp->wrk); From geoff at varnish-cache.org Wed Jun 8 12:11:11 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Wed, 08 Jun 2011 14:11:11 +0200 Subject: [experimental-ims] dedb411 Merge branch 'HEAD', remote branch 'origin' into experimental-ims Message-ID: commit dedb411d8c41c4adaa2ea5e34ebf94e2ce4a913a Merge: 06b142f 7b1006d Author: Geoff Simmons Date: Wed Jun 8 13:55:24 2011 +0200 Merge branch 'HEAD', remote branch 'origin' into experimental-ims From tfheen at varnish-cache.org Thu Jun 9 06:53:12 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Thu, 09 Jun 2011 08:53:12 +0200 Subject: [master] 48392ad Fix crash in varnishadm when secret file is unreadable Message-ID: commit 48392ad84205195f8d624e281f3b93d7d736ce46 Author: Tollef Fog Heen Date: Thu Jun 9 08:51:13 2011 +0200 Fix crash in varnishadm when secret file is unreadable Record the original strdup-ed value so we can free it afterwards. Fixes: #935 diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index baa4048..46273bc 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -274,7 +274,7 @@ usage(void) static int n_arg_sock(const char *n_arg) { - char *T_arg = NULL; + char *T_arg = NULL, *T_start = NULL; char *S_arg = NULL; struct VSM_data *vsd; char *p; @@ -292,7 +292,7 @@ n_arg_sock(const char *n_arg) fprintf(stderr, "No -T arg in shared memory\n"); return (-1); } - T_arg = strdup(p); + T_start = T_arg = strdup(p); } if (S_arg == NULL) { p = VSM_Find_Chunk(vsd, "Arg", "-S", "", NULL); @@ -309,7 +309,7 @@ n_arg_sock(const char *n_arg) break; T_arg = p + 1; } - free(T_arg); + free(T_start); free(S_arg); return (sock); } From tfheen at varnish-cache.org Thu Jun 9 07:06:32 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Thu, 09 Jun 2011 09:06:32 +0200 Subject: [master] 7077261 Mark synthetic as only available in vcl_error Message-ID: commit 7077261e1b1cb38ab152119742a6a001748e8901 Author: Tollef Fog Heen Date: Thu Jun 9 09:05:41 2011 +0200 Mark synthetic as only available in vcl_error Eventually, we want to be able to do synthetic everywhere, but for now, mark it as just available in vcl_error. Fixes: #936 diff --git a/bin/varnishtest/tests/r00936.vtc b/bin/varnishtest/tests/r00936.vtc new file mode 100644 index 0000000..544245a --- /dev/null +++ b/bin/varnishtest/tests/r00936.vtc @@ -0,0 +1,15 @@ +varnishtest "synthetic is only allowed in error" + +server s1 { + rxreq + txresp +} -start + +varnish v1 -badvcl { + backend foo { .host = "127.0.0.1"; } + + sub vcl_recv { + synthetic "HELLOO"; return (error); + } +} + diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c index 801360a..0600fd0 100644 --- a/lib/libvcl/vcc_action.c +++ b/lib/libvcl/vcc_action.c @@ -342,7 +342,7 @@ static struct action_table { { "return", parse_return }, { "rollback", parse_rollback }, { "set", parse_set }, - { "synthetic", parse_synthetic }, + { "synthetic", parse_synthetic, VCL_MET_ERROR }, { "unset", parse_unset }, { "purge", parse_purge, VCL_MET_MISS | VCL_MET_HIT }, { NULL, NULL } From martin at varnish-cache.org Thu Jun 9 12:37:55 2011 From: martin at varnish-cache.org (Martin Blix Grydeland) Date: Thu, 09 Jun 2011 14:37:55 +0200 Subject: [master] d81cc9b Always exit if no socket could be connected Message-ID: commit d81cc9b5f4a1d960d6375f67b6cd0a71bbb8f565 Author: Martin Blix Grydeland Date: Thu Jun 9 14:00:09 2011 +0200 Always exit if no socket could be connected diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 46273bc..151a437 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -349,16 +349,14 @@ main(int argc, char * const *argv) usage(); } sock = n_arg_sock(n_arg); - if (sock < 0) - exit(2); } else if (T_arg == NULL) { sock = n_arg_sock(""); - if (sock < 0) - exit(2); } else { assert(T_arg != NULL); sock = cli_sock(T_arg, S_arg); } + if (sock < 0) + exit(2); if (argc > 0) do_args(sock, argc, argv); From martin at varnish-cache.org Fri Jun 10 07:53:28 2011 From: martin at varnish-cache.org (Martin Blix Grydeland) Date: Fri, 10 Jun 2011 09:53:28 +0200 Subject: [master] 939d229 Seed random() on startup from /dev/urandom so vtmpfile actually returns random file names Message-ID: commit 939d2299c51c8af03b663185b79c49e3d7833d86 Author: Martin Blix Grydeland Date: Fri Jun 10 09:43:48 2011 +0200 Seed random() on startup from /dev/urandom so vtmpfile actually returns random file names diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index 9dae7d3..ded54ae 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -364,6 +364,8 @@ main(int argc, char * const *argv) for (o = getdtablesize(); o > STDERR_FILENO; o--) (void)close(o); + AZ(seed_random()); + mgt_got_fd(STDERR_FILENO); setbuf(stdout, NULL); diff --git a/include/libvarnish.h b/include/libvarnish.h index afa9f2f..317dc9e 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -99,6 +99,7 @@ struct timeval TIM_timeval(double t); void VCS_Message(const char *); /* from libvarnish/vtmpfile.c */ +int seed_random(void); int vtmpfile(char *); char *vreadfile(const char *pfx, const char *fn, ssize_t *sz); char *vreadfd(int fd, ssize_t *sz); diff --git a/lib/libvarnish/vtmpfile.c b/lib/libvarnish/vtmpfile.c index 63dde2d..60a9c21 100644 --- a/lib/libvarnish/vtmpfile.c +++ b/lib/libvarnish/vtmpfile.c @@ -41,6 +41,22 @@ #include "libvarnish.h" int +seed_random(void) +{ + int fd; + unsigned seed; + + fd = open("/dev/urandom", O_RDONLY); + if (fd == -1) + return (1); + if (read(fd, &seed, sizeof seed) != sizeof seed) + return (1); + (void)close(fd); + srandom(seed); + return (0); +} + +int vtmpfile(char *template) { char *b, *e, *p; From phk at varnish-cache.org Tue Jun 14 08:42:29 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 14 Jun 2011 10:42:29 +0200 Subject: [master] c316746 Attempt a distclean first, something gets cached otherwise. Message-ID: commit c316746df309e7adf720cf4a1a38889e390aa273 Author: Poul-Henning Kamp Date: Tue Jun 14 08:42:04 2011 +0000 Attempt a distclean first, something gets cached otherwise. diff --git a/autogen.des b/autogen.des index a75d482..58f3c2b 100755 --- a/autogen.des +++ b/autogen.des @@ -4,6 +4,8 @@ set -ex +make -k distclean > /dev/null 2>&1 || true + # Prefer CLANG if we have it, and have not given preferences if [ -f /usr/bin/clang -a "x${CC}" = "x" ] ; then CC=clang From tfheen at varnish-cache.org Thu Jun 16 11:30:44 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Thu, 16 Jun 2011 13:30:44 +0200 Subject: [master] ecacfef Fix type for grabbing size of a regex Message-ID: commit ecacfefabffc7364e59ae5082c8d261fda5817fb Author: Tollef Fog Heen Date: Thu Jun 16 13:26:56 2011 +0200 Fix type for grabbing size of a regex The size of a regex is a size_t. Spotted by gcc 4.6 diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index d62cac6..bbfe57f 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -292,7 +292,8 @@ static int ban_parse_regexp(struct cli *cli, const struct ban *b, const char *a3) { const char *error; - int erroroffset, rc, sz; + int erroroffset, rc; + size_t sz; pcre *re; re = pcre_compile(a3, 0, &error, &erroroffset, NULL); From tfheen at varnish-cache.org Thu Jun 16 11:30:47 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Thu, 16 Jun 2011 13:30:47 +0200 Subject: [master] 9d176e5 Fix docs for do_gzip default value Message-ID: commit 9d176e5b2ed233a06dbd712a020957b71e2f87d3 Author: Tollef Fog Heen Date: Thu Jun 16 13:30:35 2011 +0200 Fix docs for do_gzip default value diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 17ccf88..46efc67 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -652,7 +652,7 @@ beresp.do_esi to true to parse the object for ESI directives. beresp.do_gzip - Boolean. Gzip the object before storing it. Defaults to true. + Boolean. Gzip the object before storing it. Defaults to false. beresp.do_gunzip Boolean. Unzip the object before storing it in the cache. Defaults From phk at varnish-cache.org Fri Jun 17 08:59:38 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 17 Jun 2011 10:59:38 +0200 Subject: [master] 099c22c Request specific variables are not available in vcl_init{} and vcl_fini{} Message-ID: commit 099c22c01cadd01ef96d98f77e0c0e2b173f6ae6 Author: Poul-Henning Kamp Date: Thu Jun 16 06:25:44 2011 +0000 Request specific variables are not available in vcl_init{} and vcl_fini{} diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index ffb8a08..5407a51 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -98,107 +98,110 @@ returns =( ####################################################################### # Variables available in sessions +# +# 'all' means all methods +# 'proc' means all methods but 'init' and 'fini' sp_variables = ( ('client.ip', 'IP', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('client.identity', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('server.ip', 'IP', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.hostname', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.identity', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.port', 'INT', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('req.request', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.url', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.proto', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.http.', 'HDR_REQ', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.backend', 'BACKEND', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.restarts', 'INT', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('req.esi_level', 'INT', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('req.ttl', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.grace', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.keep', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.xid', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), @@ -210,13 +213,13 @@ sp_variables = ( ), ('req.can_gzip', 'BOOL', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('req.backend.healthy', 'BOOL', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), @@ -773,6 +776,11 @@ def restrict(fo, spec): return if spec[0] == 'all': spec = vcls + if spec[0] == 'proc': + spec = list() + for i in vcls: + if i != "init" and i != "fini": + spec.append(i) p = "" n = 0 for j in spec: From phk at varnish-cache.org Fri Jun 17 08:59:38 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 17 Jun 2011 10:59:38 +0200 Subject: [master] a6d2df9 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit a6d2df9e75e7dda1002499e73c4b5a7ef3b16ff3 Merge: 099c22c 9d176e5 Author: Poul-Henning Kamp Date: Thu Jun 16 21:04:59 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Sat Jun 18 13:27:58 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:27:58 +0200 Subject: [master] 6e50c1d Reference varnish-cli + -n semantics Message-ID: commit 6e50c1d6ee44b3d2c510c08abdf5577f6240cf8d Author: Per Buer Date: Fri Apr 29 18:44:29 2011 +0200 Reference varnish-cli + -n semantics diff --git a/doc/sphinx/reference/varnishadm.rst b/doc/sphinx/reference/varnishadm.rst index af68355..70758fb 100644 --- a/doc/sphinx/reference/varnishadm.rst +++ b/doc/sphinx/reference/varnishadm.rst @@ -9,7 +9,7 @@ Control a running varnish instance :Author: Cecilie Fritzvold :Author: Per Buer :Date: 2010-05-31 -:Version: 0.2 +:Version: 0.3 :Manual section: 1 SYNOPSIS @@ -21,7 +21,10 @@ DESCRIPTION =========== The varnishadm utility establishes a CLI connection to varnishd either -using -n *name* or using the -T and -S arguments. If -n *name* is the location of the secret file and the address:port is looked up in shared memory. If neither is given varnishadm will look for an instance without a given name. +using -n *name* or using the -T and -S arguments. If -n *name* is +given the location of the secret file and the address:port is looked +up in shared memory. If neither is given varnishadm will look for an +instance without a given name. If a command is given, the command and arguments are sent over the CLI connection and the result returned on stdout. @@ -46,10 +49,13 @@ OPTIONS -n name Connect to the instance of varnishd with this name. -Available commands and parameters are documented in the varnishd(1) -manual page. Additionally, a summary of commands can be obtained by -issuing the *help* command, and a summary of parameters can be -obtained by issuing the *param.show* command. +The syntax and operation of the actual CLI interface is described in +the varnish-cli(7) manual page. Parameteres are described in +varnishd(1) manual page. + +Additionally, a summary of commands can be obtained by issuing the +*help* command, and a summary of parameters can be obtained by issuing +the *param.show* command. EXIT STATUS =========== From perbu at varnish-cache.org Sat Jun 18 13:27:58 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:27:58 +0200 Subject: [master] 2345b5a reference varnish-cli(7) Message-ID: commit 2345b5a7d83bcd03dc1ab08f6856db7934a375ea Author: Per Buer Date: Fri Apr 29 18:46:08 2011 +0200 reference varnish-cli(7) diff --git a/doc/sphinx/reference/varnishd.rst b/doc/sphinx/reference/varnishd.rst index 1d3add5..e18c412 100644 --- a/doc/sphinx/reference/varnishd.rst +++ b/doc/sphinx/reference/varnishd.rst @@ -766,6 +766,7 @@ waiter SEE ALSO ======== +* varnish-cli(7) * varnishlog(1) * varnishhist(1) * varnishncsa(1) From perbu at varnish-cache.org Sat Jun 18 13:27:59 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:27:59 +0200 Subject: [master] 44e493f Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 44e493fed07efb15bb21d0172bf004ef50a3846b Merge: 2345b5a 5d5c345 Author: Per Buer Date: Fri Apr 29 18:46:28 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Sat Jun 18 13:28:00 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:28:00 +0200 Subject: [master] 8b892f9 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 8b892f9ad20ffd9feac66a051ef18fb5bb649497 Merge: 44e493f 5e2c77b Author: Per Buer Date: Fri May 20 20:01:47 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Sat Jun 18 13:28:00 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:28:00 +0200 Subject: [master] c9c8716 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit c9c8716cd269db8f7ee6e9612f52ad22b6745749 Merge: 8b892f9 0fb00eb Author: Per Buer Date: Mon May 23 13:10:28 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Sat Jun 18 13:28:00 2011 From: perbu at varnish-cache.org (Per Buer) Date: Sat, 18 Jun 2011 15:28:00 +0200 Subject: [master] 999cb33 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 999cb3318220580a1ae6453fc9b7bd0284e929ac Merge: c9c8716 a6d2df9 Author: Per Buer Date: Sat Jun 18 15:25:58 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From tfheen at varnish-cache.org Sat Jun 18 17:02:10 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Sat, 18 Jun 2011 19:02:10 +0200 Subject: [master] b0fb05b Change master version back to trunk Message-ID: commit b0fb05b4dd284bcb641110dd2e17e6fcc254d333 Author: Tollef Fog Heen Date: Sat Jun 18 19:01:59 2011 +0200 Change master version back to trunk diff --git a/configure.ac b/configure.ac index 57287f5..1cdaa0c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [3.0.0-beta2], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [trunk], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From geoff at varnish-cache.org Sun Jun 19 16:04:57 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:57 +0200 Subject: [experimental-ims] 17accda Reference varnish-cli + -n semantics Message-ID: commit 17accdaf5c6c31efe22b7c7c78e55ef7be96f64d Author: Per Buer Date: Fri Apr 29 18:44:29 2011 +0200 Reference varnish-cli + -n semantics diff --git a/doc/sphinx/reference/varnishadm.rst b/doc/sphinx/reference/varnishadm.rst index 7d543c2..bfad196 100644 --- a/doc/sphinx/reference/varnishadm.rst +++ b/doc/sphinx/reference/varnishadm.rst @@ -9,7 +9,7 @@ Control a running varnish instance :Author: Cecilie Fritzvold :Author: Per Buer :Date: 2010-05-31 -:Version: 0.2 +:Version: 0.3 :Manual section: 1 SYNOPSIS @@ -21,7 +21,10 @@ DESCRIPTION =========== The varnishadm utility establishes a CLI connection to varnishd either -using -n *name* or using the -T and -S arguments. If -n *name* is the location of the secret file and the address:port is looked up in shared memory. If neither is given varnishadm will look for an instance without a given name. +using -n *name* or using the -T and -S arguments. If -n *name* is +given the location of the secret file and the address:port is looked +up in shared memory. If neither is given varnishadm will look for an +instance without a given name. If a command is given, the command and arguments are sent over the CLI connection and the result returned on stdout. @@ -46,10 +49,13 @@ OPTIONS -n name Connect to the instance of varnishd with this name. -Available commands and parameters are documented in the varnishd(1) -manual page. Additionally, a summary of commands can be obtained by -issuing the *help* command, and a summary of parameters can be -obtained by issuing the *param.show* command. +The syntax and operation of the actual CLI interface is described in +the varnish-cli(7) manual page. Parameteres are described in +varnishd(1) manual page. + +Additionally, a summary of commands can be obtained by issuing the +*help* command, and a summary of parameters can be obtained by issuing +the *param.show* command. EXIT STATUS =========== From geoff at varnish-cache.org Sun Jun 19 16:04:57 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:57 +0200 Subject: [experimental-ims] ac081dc reference varnish-cli(7) Message-ID: commit ac081dc5c41316737bc5c482f9b3dca8364c5c00 Author: Per Buer Date: Fri Apr 29 18:46:08 2011 +0200 reference varnish-cli(7) diff --git a/doc/sphinx/reference/varnishd.rst b/doc/sphinx/reference/varnishd.rst index e6c1798..da7ae6b 100644 --- a/doc/sphinx/reference/varnishd.rst +++ b/doc/sphinx/reference/varnishd.rst @@ -776,6 +776,7 @@ waiter SEE ALSO ======== +* varnish-cli(7) * varnishlog(1) * varnishhist(1) * varnishncsa(1) From geoff at varnish-cache.org Sun Jun 19 16:04:57 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:57 +0200 Subject: [experimental-ims] eb5c9a2 Fix crash in varnishadm when secret file is unreadable Message-ID: commit eb5c9a2870b493b4c914bf56b159615a2d567896 Author: Tollef Fog Heen Date: Thu Jun 9 08:51:13 2011 +0200 Fix crash in varnishadm when secret file is unreadable Record the original strdup-ed value so we can free it afterwards. Fixes: #935 diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index baa4048..46273bc 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -274,7 +274,7 @@ usage(void) static int n_arg_sock(const char *n_arg) { - char *T_arg = NULL; + char *T_arg = NULL, *T_start = NULL; char *S_arg = NULL; struct VSM_data *vsd; char *p; @@ -292,7 +292,7 @@ n_arg_sock(const char *n_arg) fprintf(stderr, "No -T arg in shared memory\n"); return (-1); } - T_arg = strdup(p); + T_start = T_arg = strdup(p); } if (S_arg == NULL) { p = VSM_Find_Chunk(vsd, "Arg", "-S", "", NULL); @@ -309,7 +309,7 @@ n_arg_sock(const char *n_arg) break; T_arg = p + 1; } - free(T_arg); + free(T_start); free(S_arg); return (sock); } From geoff at varnish-cache.org Sun Jun 19 16:04:57 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:57 +0200 Subject: [experimental-ims] 3ad76c3 Mark synthetic as only available in vcl_error Message-ID: commit 3ad76c3b3566dc19f392a70a27d68417c6d756e0 Author: Tollef Fog Heen Date: Thu Jun 9 09:05:41 2011 +0200 Mark synthetic as only available in vcl_error Eventually, we want to be able to do synthetic everywhere, but for now, mark it as just available in vcl_error. Fixes: #936 diff --git a/bin/varnishtest/tests/r00936.vtc b/bin/varnishtest/tests/r00936.vtc new file mode 100644 index 0000000..544245a --- /dev/null +++ b/bin/varnishtest/tests/r00936.vtc @@ -0,0 +1,15 @@ +varnishtest "synthetic is only allowed in error" + +server s1 { + rxreq + txresp +} -start + +varnish v1 -badvcl { + backend foo { .host = "127.0.0.1"; } + + sub vcl_recv { + synthetic "HELLOO"; return (error); + } +} + diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c index 801360a..0600fd0 100644 --- a/lib/libvcl/vcc_action.c +++ b/lib/libvcl/vcc_action.c @@ -342,7 +342,7 @@ static struct action_table { { "return", parse_return }, { "rollback", parse_rollback }, { "set", parse_set }, - { "synthetic", parse_synthetic }, + { "synthetic", parse_synthetic, VCL_MET_ERROR }, { "unset", parse_unset }, { "purge", parse_purge, VCL_MET_MISS | VCL_MET_HIT }, { NULL, NULL } From geoff at varnish-cache.org Sun Jun 19 16:04:58 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:58 +0200 Subject: [experimental-ims] 143aa7f Always exit if no socket could be connected Message-ID: commit 143aa7f55de66403d9071dc1f714a01681425a39 Author: Martin Blix Grydeland Date: Thu Jun 9 14:00:09 2011 +0200 Always exit if no socket could be connected diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 46273bc..151a437 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -349,16 +349,14 @@ main(int argc, char * const *argv) usage(); } sock = n_arg_sock(n_arg); - if (sock < 0) - exit(2); } else if (T_arg == NULL) { sock = n_arg_sock(""); - if (sock < 0) - exit(2); } else { assert(T_arg != NULL); sock = cli_sock(T_arg, S_arg); } + if (sock < 0) + exit(2); if (argc > 0) do_args(sock, argc, argv); From geoff at varnish-cache.org Sun Jun 19 16:04:58 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:58 +0200 Subject: [experimental-ims] 2f5fb0b Seed random() on startup from /dev/urandom so vtmpfile actually returns random file names Message-ID: commit 2f5fb0b38c4ddaee486e0aa410afe77b9a4bbd4e Author: Martin Blix Grydeland Date: Fri Jun 10 09:43:48 2011 +0200 Seed random() on startup from /dev/urandom so vtmpfile actually returns random file names diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index 9dae7d3..ded54ae 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -364,6 +364,8 @@ main(int argc, char * const *argv) for (o = getdtablesize(); o > STDERR_FILENO; o--) (void)close(o); + AZ(seed_random()); + mgt_got_fd(STDERR_FILENO); setbuf(stdout, NULL); diff --git a/include/libvarnish.h b/include/libvarnish.h index afa9f2f..317dc9e 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -99,6 +99,7 @@ struct timeval TIM_timeval(double t); void VCS_Message(const char *); /* from libvarnish/vtmpfile.c */ +int seed_random(void); int vtmpfile(char *); char *vreadfile(const char *pfx, const char *fn, ssize_t *sz); char *vreadfd(int fd, ssize_t *sz); diff --git a/lib/libvarnish/vtmpfile.c b/lib/libvarnish/vtmpfile.c index 63dde2d..60a9c21 100644 --- a/lib/libvarnish/vtmpfile.c +++ b/lib/libvarnish/vtmpfile.c @@ -41,6 +41,22 @@ #include "libvarnish.h" int +seed_random(void) +{ + int fd; + unsigned seed; + + fd = open("/dev/urandom", O_RDONLY); + if (fd == -1) + return (1); + if (read(fd, &seed, sizeof seed) != sizeof seed) + return (1); + (void)close(fd); + srandom(seed); + return (0); +} + +int vtmpfile(char *template) { char *b, *e, *p; From geoff at varnish-cache.org Sun Jun 19 16:04:59 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:59 +0200 Subject: [experimental-ims] 1b09ba8 Attempt a distclean first, something gets cached otherwise. Message-ID: commit 1b09ba8644db91e85114f00a7ccb235436ca45e7 Author: Poul-Henning Kamp Date: Tue Jun 14 08:42:04 2011 +0000 Attempt a distclean first, something gets cached otherwise. diff --git a/autogen.des b/autogen.des index a75d482..58f3c2b 100755 --- a/autogen.des +++ b/autogen.des @@ -4,6 +4,8 @@ set -ex +make -k distclean > /dev/null 2>&1 || true + # Prefer CLANG if we have it, and have not given preferences if [ -f /usr/bin/clang -a "x${CC}" = "x" ] ; then CC=clang From geoff at varnish-cache.org Sun Jun 19 16:04:59 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:59 +0200 Subject: [experimental-ims] d6d9096 Request specific variables are not available in vcl_init{} and vcl_fini{} Message-ID: commit d6d90960a586bf5efbb48edd98580b29ae631619 Author: Poul-Henning Kamp Date: Thu Jun 16 06:25:44 2011 +0000 Request specific variables are not available in vcl_init{} and vcl_fini{} diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index e4a0137..28375fa 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -98,107 +98,110 @@ returns =( ####################################################################### # Variables available in sessions +# +# 'all' means all methods +# 'proc' means all methods but 'init' and 'fini' sp_variables = ( ('client.ip', 'IP', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('client.identity', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('server.ip', 'IP', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.hostname', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.identity', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('server.port', 'INT', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('req.request', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.url', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.proto', 'STRING', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.http.', 'HDR_REQ', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'const struct sess *' ), ('req.backend', 'BACKEND', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.restarts', 'INT', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('req.esi_level', 'INT', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), ('req.ttl', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.grace', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.keep', 'DURATION', - ( 'all',), - ( 'all',), + ( 'proc',), + ( 'proc',), 'struct sess *' ), ('req.xid', 'STRING', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), @@ -210,13 +213,13 @@ sp_variables = ( ), ('req.can_gzip', 'BOOL', - ( 'all',), + ( 'proc',), ( ), 'struct sess *' ), ('req.backend.healthy', 'BOOL', - ( 'all',), + ( 'proc',), ( ), 'const struct sess *' ), @@ -833,6 +836,11 @@ def restrict(fo, spec): return if spec[0] == 'all': spec = vcls + if spec[0] == 'proc': + spec = list() + for i in vcls: + if i != "init" and i != "fini": + spec.append(i) p = "" n = 0 for j in spec: From geoff at varnish-cache.org Sun Jun 19 16:04:59 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:59 +0200 Subject: [experimental-ims] 2772d3e Fix type for grabbing size of a regex Message-ID: commit 2772d3ea2895f90f28e91e284a3e3de47a8bf7aa Author: Tollef Fog Heen Date: Thu Jun 16 13:26:56 2011 +0200 Fix type for grabbing size of a regex The size of a regex is a size_t. Spotted by gcc 4.6 diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index d62cac6..bbfe57f 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -292,7 +292,8 @@ static int ban_parse_regexp(struct cli *cli, const struct ban *b, const char *a3) { const char *error; - int erroroffset, rc, sz; + int erroroffset, rc; + size_t sz; pcre *re; re = pcre_compile(a3, 0, &error, &erroroffset, NULL); From geoff at varnish-cache.org Sun Jun 19 16:04:59 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:04:59 +0200 Subject: [experimental-ims] d26b2ac Fix docs for do_gzip default value Message-ID: commit d26b2ac671bf73b2bba3cce2ecde62604157f9c7 Author: Tollef Fog Heen Date: Thu Jun 16 13:30:35 2011 +0200 Fix docs for do_gzip default value diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 17ccf88..46efc67 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -652,7 +652,7 @@ beresp.do_esi to true to parse the object for ESI directives. beresp.do_gzip - Boolean. Gzip the object before storing it. Defaults to true. + Boolean. Gzip the object before storing it. Defaults to false. beresp.do_gunzip Boolean. Unzip the object before storing it in the cache. Defaults From geoff at varnish-cache.org Sun Jun 19 16:05:00 2011 From: geoff at varnish-cache.org (Geoff Simmons) Date: Sun, 19 Jun 2011 18:05:00 +0200 Subject: [experimental-ims] cd23977 Change master version back to trunk Message-ID: commit cd2397702db85a95caf0f70e5e83484fca23bc43 Author: Tollef Fog Heen Date: Sat Jun 18 19:01:59 2011 +0200 Change master version back to trunk diff --git a/configure.ac b/configure.ac index 57287f5..1cdaa0c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [3.0.0-beta2], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [trunk], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From phk at varnish-cache.org Mon Jun 20 07:38:52 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 09:38:52 +0200 Subject: [master] a03c58d Pass priv2 member instead of objcore pointer, thats all we need. Message-ID: commit a03c58d40ecf4b656a2e41f5865b24b277c23505 Author: Poul-Henning Kamp Date: Mon Jun 20 07:38:19 2011 +0000 Pass priv2 member instead of objcore pointer, thats all we need. diff --git a/bin/varnishd/storage_persistent_silo.c b/bin/varnishd/storage_persistent_silo.c index d4ccf1e..a1eb98b 100644 --- a/bin/varnishd/storage_persistent_silo.c +++ b/bin/varnishd/storage_persistent_silo.c @@ -308,15 +308,13 @@ smp_close_seg(struct smp_sc *sc, struct smp_seg *sg) */ static struct smp_object * -smp_find_so(const struct smp_seg *sg, const struct objcore *oc) +smp_find_so(const struct smp_seg *sg, unsigned priv2) { struct smp_object *so; - unsigned smp_idx; - smp_idx = oc->priv2; - assert(smp_idx > 0); - assert(smp_idx <= sg->p.lobjlist); - so = &sg->objs[sg->p.lobjlist - smp_idx]; + assert(priv2 > 0); + assert(priv2 <= sg->p.lobjlist); + so = &sg->objs[sg->p.lobjlist - priv2]; return (so); } @@ -390,7 +388,7 @@ smp_oc_getobj(struct worker *wrk, struct objcore *oc) AZ(oc->flags & OC_F_NEEDFIXUP); CAST_OBJ_NOTNULL(sg, oc->priv, SMP_SEG_MAGIC); - so = smp_find_so(sg, oc); + so = smp_find_so(sg, oc->priv2); o = (void*)(sg->sc->base + so->ptr); /* @@ -456,7 +454,7 @@ smp_oc_updatemeta(struct objcore *oc) CAST_OBJ_NOTNULL(sg, oc->priv, SMP_SEG_MAGIC); CHECK_OBJ_NOTNULL(sg->sc, SMP_SC_MAGIC); - so = smp_find_so(sg, oc); + so = smp_find_so(sg, oc->priv2); mttl = EXP_Grace(NULL, o); @@ -481,7 +479,7 @@ smp_oc_freeobj(struct objcore *oc) CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CAST_OBJ_NOTNULL(sg, oc->priv, SMP_SEG_MAGIC); - so = smp_find_so(sg, oc); + so = smp_find_so(sg, oc->priv2); Lck_Lock(&sg->sc->mtx); so->ttl = 0; From phk at varnish-cache.org Mon Jun 20 08:10:16 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 10:10:16 +0200 Subject: [master] 4f59702 Optimize the objhead layout to avoid packing on 64bit systems. Message-ID: commit 4f59702c160b0456f2956938b777d86eab9031f4 Author: Poul-Henning Kamp Date: Mon Jun 20 08:09:48 2011 +0000 Optimize the objhead layout to avoid packing on 64bit systems. diff --git a/bin/varnishd/hash_slinger.h b/bin/varnishd/hash_slinger.h index b9430c7..2c142cf 100644 --- a/bin/varnishd/hash_slinger.h +++ b/bin/varnishd/hash_slinger.h @@ -75,8 +75,8 @@ struct objhead { unsigned magic; #define OBJHEAD_MAGIC 0x1b96615d - struct lock mtx; int refcnt; + struct lock mtx; VTAILQ_HEAD(,objcore) objcs; unsigned char digest[DIGEST_LEN]; struct waitinglist *waitinglist; From martin at varnish-cache.org Mon Jun 20 08:22:55 2011 From: martin at varnish-cache.org (Martin Blix Grydeland) Date: Mon, 20 Jun 2011 10:22:55 +0200 Subject: [master] 78df00d Use file locking on SHMFILE to indicate this file is currently in use Message-ID: commit 78df00d176c2cc323b4a66024aac2087a09a9e0b Author: Martin Blix Grydeland Date: Tue Jun 14 13:09:56 2011 +0200 Use file locking on SHMFILE to indicate this file is currently in use Fixes: #876 diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c index f28bc9b..4fc905c 100644 --- a/bin/varnishd/mgt_shmem.c +++ b/bin/varnishd/mgt_shmem.c @@ -101,6 +101,7 @@ #include "heritage.h" #include "vmb.h" #include "vsm.h" +#include "flopen.h" #ifndef MAP_HASSEMAPHORE #define MAP_HASSEMAPHORE 0 /* XXX Linux */ @@ -125,11 +126,24 @@ vsl_n_check(int fd) struct VSM_head slh; int i; struct stat st; + pid_t pid; AZ(fstat(fd, &st)); if (!S_ISREG(st.st_mode)) ARGV_ERR("\tshmlog: Not a file\n"); + /* Test if the SHMFILE is locked by other Varnish */ + if (fltest(fd, &pid) > 0) { + fprintf(stderr, + "SHMFILE locked by running varnishd master (pid=%jd)\n", + (intmax_t)pid); + fprintf(stderr, + "(Use unique -n arguments if you want multiple " + "instances)\n"); + exit(2); + } + + /* Read owning pid from SHMFILE */ memset(&slh, 0, sizeof slh); /* XXX: for flexelint */ i = read(fd, &slh, sizeof slh); if (i != sizeof slh) @@ -138,15 +152,11 @@ vsl_n_check(int fd) return; if (slh.hdrsize != sizeof slh) return; - if (slh.master_pid != 0 && !kill(slh.master_pid, 0)) { - fprintf(stderr, - "SHMFILE owned by running varnishd master (pid=%jd)\n", - (intmax_t)slh.master_pid); - fprintf(stderr, - "(Use unique -n arguments if you want multiple " - "instances.)\n"); - exit(2); + fprintf(stderr, + "WARNING: Taking over SHMFILE marked as owned by " + "running process (pid=%jd)\n", + (intmax_t)slh.master_pid); } } @@ -161,15 +171,20 @@ vsl_buildnew(const char *fn, unsigned size, int fill) int i; unsigned u; char buf[64*1024]; + int flags; (void)unlink(fn); - vsl_fd = open(fn, O_RDWR | O_CREAT | O_EXCL, 0644); + vsl_fd = flopen(fn, O_RDWR | O_CREAT | O_EXCL | O_NONBLOCK, 0644); if (vsl_fd < 0) { fprintf(stderr, "Could not create %s: %s\n", fn, strerror(errno)); exit (1); } - + flags = fcntl(vsl_fd, F_GETFL); + assert(flags != -1); + flags &= ~O_NONBLOCK; + AZ(fcntl(vsl_fd, F_SETFL, flags)); + memset(&slh, 0, sizeof slh); slh.magic = VSM_HEAD_MAGIC; slh.hdrsize = sizeof slh; @@ -277,7 +292,6 @@ mgt_SHM_Init(const char *l_arg) vsl_n_check(i); (void)close(i); } - (void)close(i); vsl_buildnew(VSM_FILENAME, size, fill); VSM_head = (void *)mmap(NULL, size, diff --git a/include/flopen.h b/include/flopen.h index 4bd0209..e5b6030 100644 --- a/include/flopen.h +++ b/include/flopen.h @@ -31,6 +31,9 @@ #ifndef FLOPEN_H_INCLUDED #define FLOPEN_H_INCLUDED +#include + int flopen(const char *, int, ...); +int fltest(int fd, pid_t *pid); #endif diff --git a/lib/libvarnish/flopen.c b/lib/libvarnish/flopen.c index 43882fe..483d8d6 100644 --- a/lib/libvarnish/flopen.c +++ b/lib/libvarnish/flopen.c @@ -107,3 +107,27 @@ flopen(const char *path, int flags, ...) return (fd); } } + +/* Tests if the given fd is locked through flopen + * If pid is non-NULL, stores the pid of the process holding the lock there + * Returns 1 if the file is locked + * Returns 0 if the file is unlocked + * Returns -1 on error (and errno) + */ +int +fltest(int fd, pid_t *pid) +{ + struct flock lock; + + memset(&lock, 0, sizeof lock); + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + + if (fcntl(fd, F_GETLK, &lock) == -1) + return (-1); + if (lock.l_type == F_UNLCK) + return (0); + if (pid != NULL) + *pid = lock.l_pid; + return (1); +} From phk at varnish-cache.org Mon Jun 20 08:39:47 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 10:39:47 +0200 Subject: [master] 0d276b4 Reduce the http.protover field from double to uint8_t for space reasons. Message-ID: commit 0d276b43db1baf703519d907a80a4b98ab73e874 Author: Poul-Henning Kamp Date: Mon Jun 20 08:33:35 2011 +0000 Reduce the http.protover field from double to uint8_t for space reasons. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index f3558ff..0fe1271 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -171,7 +171,7 @@ struct http { unsigned char conds; /* If-* headers present */ enum httpwhence logtag; int status; - double protover; + uint8_t protover; unsigned shd; /* Size of hd space */ txt *hd; diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 4375344..4a17c56 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -200,7 +200,7 @@ cnt_prepresp(struct sess *sp) sp->wrk->res_mode |= RES_LEN; else if (!sp->wantbody) { /* Nothing */ - } else if (sp->http->protover >= 1.1) { + } else if (sp->http->protover >= 11) { sp->wrk->res_mode |= RES_CHUNKED; } else { sp->wrk->res_mode |= RES_EOF; diff --git a/bin/varnishd/cache_http.c b/bin/varnishd/cache_http.c index 8df780a..5d8050a 100644 --- a/bin/varnishd/cache_http.c +++ b/bin/varnishd/cache_http.c @@ -420,7 +420,7 @@ http_DoConnection(const struct http *hp) unsigned u; if (!http_GetHdr(hp, H_Connection, &p)) { - if (hp->protover < 1.1) + if (hp->protover < 11) return ("not HTTP/1.1"); return (NULL); } @@ -640,11 +640,11 @@ http_ProtoVer(struct http *hp) { if (!strcasecmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.0")) - hp->protover = 1.0; + hp->protover = 10; else if (!strcasecmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.1")) - hp->protover = 1.1; + hp->protover = 11; else - hp->protover = 0.9; + hp->protover = 9; } diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c index 83ebd71..7b2525f 100644 --- a/bin/varnishd/rfc2616.c +++ b/bin/varnishd/rfc2616.c @@ -186,7 +186,7 @@ RFC2616_Body(const struct sess *sp) hp = sp->wrk->beresp; - if (hp->protover < 1.1 && !http_HdrIs(hp, H_Connection, "keep-alive")) + if (hp->protover < 11 && !http_HdrIs(hp, H_Connection, "keep-alive")) sp->wrk->do_close = 1; else if (http_HdrIs(hp, H_Connection, "close")) sp->wrk->do_close = 1; @@ -262,7 +262,7 @@ RFC2616_Body(const struct sess *sp) return (BS_EOF); } - if (hp->protover < 1.1) { + if (hp->protover < 11) { /* * With no Connection header, assume EOF. */ From phk at varnish-cache.org Mon Jun 20 08:39:47 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 10:39:47 +0200 Subject: [master] 0b4c694 reduce some fieldwidths and pack struct http to avoid packing. Message-ID: commit 0b4c69419a603a7dadf87e82c5a98e78724ccfb6 Author: Poul-Henning Kamp Date: Mon Jun 20 08:39:17 2011 +0000 reduce some fieldwidths and pack struct http to avoid packing. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 0fe1271..48d1456 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -166,18 +166,17 @@ struct http { unsigned magic; #define HTTP_MAGIC 0x6428b5c9 - struct ws *ws; - - unsigned char conds; /* If-* headers present */ enum httpwhence logtag; - int status; - uint8_t protover; - unsigned shd; /* Size of hd space */ + struct ws *ws; txt *hd; unsigned char *hdf; #define HDF_FILTER (1 << 0) /* Filtered by Connection */ - unsigned nhd; /* Next free hd */ + uint16_t shd; /* Size of hd space */ + uint16_t nhd; /* Next free hd */ + uint16_t status; + uint8_t protover; + uint8_t conds; /* If-* headers present */ }; /*-------------------------------------------------------------------- From phk at varnish-cache.org Mon Jun 20 08:39:48 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 10:39:48 +0200 Subject: [master] 2f535f8 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 2f535f8061ba7357c18da0f5f63af912563720be Merge: 0b4c694 78df00d Author: Poul-Henning Kamp Date: Mon Jun 20 08:39:44 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Mon Jun 20 09:17:12 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 11:17:12 +0200 Subject: [master] 2d7d3c8 Pack struct ws better to avoid padding. Message-ID: commit 2d7d3c8610d1507a976576f9ed9e3c880cff8b6f Author: Poul-Henning Kamp Date: Mon Jun 20 09:16:20 2011 +0000 Pack struct ws better to avoid padding. Repack struct object, reducing a couple of field widths along the way. This shaves 16 bytes of struct object. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 48d1456..f8dedb1 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -143,12 +143,12 @@ enum step { struct ws { unsigned magic; #define WS_MAGIC 0x35fac554 + unsigned overflow; /* workspace overflowed */ const char *id; /* identity */ char *s; /* (S)tart of buffer */ char *f; /* (F)ree pointer */ char *r; /* (R)eserved length */ char *e; /* (E)nd of buffer */ - int overflow; /* workspace overflowed */ }; /*-------------------------------------------------------------------- @@ -479,12 +479,13 @@ struct object { struct objcore *objcore; struct ws ws_o[1]; - unsigned char *vary; - unsigned response; + uint8_t *vary; + unsigned hits; + uint16_t response; /* XXX: make bitmap */ - unsigned gziped; + uint8_t gziped; /* Bit positions in the gzip stream */ ssize_t gzip_start; ssize_t gzip_last; @@ -507,7 +508,6 @@ struct object { double last_use; - int hits; }; /* -------------------------------------------------------------------*/ @@ -566,7 +566,7 @@ struct sess { unsigned handling; unsigned char sendbody; unsigned char wantbody; - int err_code; + uint16_t err_code; const char *err_reason; VTAILQ_ENTRY(sess) list; diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c index 387dffb..2d3066c 100644 --- a/bin/varnishd/cache_cli.c +++ b/bin/varnishd/cache_cli.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -124,7 +125,7 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv) (void)priv; #define SZOF(foo) VCLI_Out(cli, \ - "sizeof(%s) = %zd = 0x%zx\n", #foo, sizeof(foo), sizeof(foo)); + "sizeof(%s) = %zd = 0x%zx\n", #foo, sizeof(foo), sizeof(foo)) SZOF(struct ws); SZOF(struct http); SZOF(struct http_conn); @@ -139,6 +140,63 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv) SZOF(struct vbc); SZOF(struct VSC_C_main); SZOF(struct lock); +#define OFOF(foo, bar) { foo __foo; VCLI_Out(cli, \ + "%-30s = 0x%4zx @ 0x%4zx\n", \ + #foo "." #bar, sizeof(__foo.bar), offsetof(foo, bar)); } +#if 0 + OFOF(struct objhead, magic); + OFOF(struct objhead, refcnt); + OFOF(struct objhead, mtx); + OFOF(struct objhead, objcs); + OFOF(struct objhead, digest); + OFOF(struct objhead, waitinglist); + OFOF(struct objhead, _u); +#endif +#if 0 + OFOF(struct http, magic); + OFOF(struct http, logtag); + OFOF(struct http, ws); + OFOF(struct http, hd); + OFOF(struct http, hdf); + OFOF(struct http, shd); + OFOF(struct http, nhd); + OFOF(struct http, status); + OFOF(struct http, protover); + OFOF(struct http, conds); +#endif +#if 0 + OFOF(struct storage, magic); + OFOF(struct storage, fd); + OFOF(struct storage, where); + OFOF(struct storage, list); + OFOF(struct storage, stevedore); + OFOF(struct storage, priv); + OFOF(struct storage, ptr); + OFOF(struct storage, len); + OFOF(struct storage, space); +#endif + OFOF(struct object, magic); + OFOF(struct object, xid); + OFOF(struct object, objstore); + OFOF(struct object, objcore); + OFOF(struct object, ws_o); + OFOF(struct object, vary); + OFOF(struct object, hits); + OFOF(struct object, response); + OFOF(struct object, gziped); + OFOF(struct object, gzip_start); + OFOF(struct object, gzip_last); + OFOF(struct object, gzip_stop); + OFOF(struct object, len); + OFOF(struct object, age); + OFOF(struct object, entered); + OFOF(struct object, exp); + OFOF(struct object, last_modified); + OFOF(struct object, last_lru); + OFOF(struct object, http); + OFOF(struct object, store); + OFOF(struct object, esidata); + OFOF(struct object, last_use); } /*--------------------------------------------------------------------*/ From phk at varnish-cache.org Mon Jun 20 09:28:57 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 20 Jun 2011 11:28:57 +0200 Subject: [master] 749b6d6 ifdef offsetoff output in debug.sizeof Message-ID: commit 749b6d683871778c36c874a5e0b2515a3530b405 Author: Poul-Henning Kamp Date: Mon Jun 20 09:28:41 2011 +0000 ifdef offsetoff output in debug.sizeof diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c index 2d3066c..60e63bf 100644 --- a/bin/varnishd/cache_cli.c +++ b/bin/varnishd/cache_cli.c @@ -175,6 +175,7 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv) OFOF(struct storage, len); OFOF(struct storage, space); #endif +#if 0 OFOF(struct object, magic); OFOF(struct object, xid); OFOF(struct object, objstore); @@ -197,6 +198,7 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv) OFOF(struct object, store); OFOF(struct object, esidata); OFOF(struct object, last_use); +#endif } /*--------------------------------------------------------------------*/ From phk at varnish-cache.org Tue Jun 21 09:39:26 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 21 Jun 2011 11:39:26 +0200 Subject: [master] e0bed1a Move the length field to the front of entries in the vary string. Message-ID: commit e0bed1afe24db8fac6206c3ba85d5ccc0f228112 Author: Poul-Henning Kamp Date: Tue Jun 21 09:38:55 2011 +0000 Move the length field to the front of entries in the vary string. diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 1300a20..c8578d1 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -41,13 +41,13 @@ * The vary matching string has the following format: * * Sequence of: { + * \ Length of header contents. + * / * \ *
\ Same format as argument to http_GetHdr() * ':' / * '\0' / - * \ Length of header contents. - * / - *
Only present if length != 0xffff + *
> Only present if length != 0xffff * } * '\0' */ @@ -97,9 +97,6 @@ VRY_Create(const struct sess *sp, const struct http *hp) (char)(1 + (q - p)), (int)(q - p), p, 0); AZ(VSB_finish(sbh)); - /* Append to vary matching string */ - VSB_bcat(sb, VSB_data(sbh), VSB_len(sbh)); - if (http_GetHdr(sp->http, VSB_data(sbh), &h)) { /* Trim leading and trailing space */ while (isspace(*h)) @@ -110,12 +107,15 @@ VRY_Create(const struct sess *sp, const struct http *hp) /* Encode two byte length and contents */ l = e - h; assert(!(l & ~0xffff)); - VSB_printf(sb, "%c%c", (unsigned)l >> 8, l & 0xff); - VSB_bcat(sb, h, e - h); } else { - /* Mark as "not present" */ - VSB_printf(sb, "%c%c", 0xff, 0xff); + e = h; + l = 0xffff; } + VSB_printf(sb, "%c%c", (unsigned)l >> 8, l & 0xff); + /* Append to vary matching string */ + VSB_bcat(sb, VSB_data(sbh), VSB_len(sbh)); + if (e != h) + VSB_bcat(sb, h, e - h); while (isspace(*q)) q++; @@ -125,7 +125,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) p = q; } /* Terminate vary matching string */ - VSB_printf(sb, "%c", 0); + VSB_printf(sb, "%c%c%c", 0xff, 0xff, 0); VSB_delete(sbh); AZ(VSB_finish(sb)); @@ -133,12 +133,16 @@ VRY_Create(const struct sess *sp, const struct http *hp) } int -VRY_Match(const struct sess *sp, const unsigned char *vary) +VRY_Match(const struct sess *sp, const uint8_t *vary) { char *h, *e; int i, l, lh; - while (*vary) { + while (1) { + l = vary[0] * 256 + vary[1]; + vary += 2; + if (!*vary) + break; if (params->http_gzip_support && !strcasecmp(H_Accept_Encoding, (const char*)vary)) { @@ -152,8 +156,6 @@ VRY_Match(const struct sess *sp, const unsigned char *vary) * setting of http_gzip_support. */ vary += *vary + 2; - l = vary[0] * 256 + vary[1]; - vary += 2; if (l != 0xffff) vary += l; continue; @@ -162,10 +164,6 @@ VRY_Match(const struct sess *sp, const unsigned char *vary) i = http_GetHdr(sp->http, (const char*)vary, &h); vary += *vary + 2; - /* Expected length of header (or 0xffff) */ - l = vary[0] * 256 + vary[1]; - vary += 2; - /* Fail if we have the header, but shouldn't */ if (i && l == 0xffff) return (0); From phk at varnish-cache.org Tue Jun 21 09:47:20 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 21 Jun 2011 11:47:20 +0200 Subject: [master] 0f354ac Use VCT instead of . Trust HTTP_GetHdr() to remove leading white space. Message-ID: commit 0f354aca14c7ee41c22ba8f56ff43d7ba5e7e443 Author: Poul-Henning Kamp Date: Tue Jun 21 09:46:35 2011 +0000 Use VCT instead of . Trust HTTP_GetHdr() to remove leading white space. diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index c8578d1..8eab103 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -54,11 +54,11 @@ #include "config.h" -#include #include #include #include "cache.h" +#include "vct.h" struct vsb * VRY_Create(const struct sess *sp, const struct http *hp) @@ -86,9 +86,9 @@ VRY_Create(const struct sess *sp, const struct http *hp) for (p = v; *p; p++) { /* Find next header-name */ - if (isspace(*p)) + if (vct_issp(*p)) continue; - for (q = p; *q && !isspace(*q) && *q != ','; q++) + for (q = p; *q && !vct_issp(*q) && *q != ','; q++) continue; /* Build a header-matching string out of it */ @@ -98,11 +98,10 @@ VRY_Create(const struct sess *sp, const struct http *hp) AZ(VSB_finish(sbh)); if (http_GetHdr(sp->http, VSB_data(sbh), &h)) { - /* Trim leading and trailing space */ - while (isspace(*h)) - h++; + AZ(vct_issp(*h)); + /* Trim trailing space */ e = strchr(h, '\0'); - while (e > h && isspace(e[-1])) + while (e > h && vct_issp(e[-1])) e--; /* Encode two byte length and contents */ l = e - h; @@ -117,7 +116,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) if (e != h) VSB_bcat(sb, h, e - h); - while (isspace(*q)) + while (vct_issp(*q)) q++; if (*q == '\0') break; @@ -175,11 +174,9 @@ VRY_Match(const struct sess *sp, const uint8_t *vary) if (!i) continue; - /* Trim leading & trailing space */ - while (isspace(*h)) - h++; + /* Trim trailing space */ e = strchr(h, '\0'); - while (e > h && isspace(e[-1])) + while (e > h && vct_issp(e[-1])) e--; /* Fail if wrong length */ From phk at varnish-cache.org Tue Jun 21 11:59:39 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 21 Jun 2011 13:59:39 +0200 Subject: [master] 7bc0068 Overhaul the Vary matching code to make it faster, by assuming (but do not trusting) that all objects under an objhdr have the same Vary string. Message-ID: commit 7bc0068d8f422c917042e35867e00a19f8956f46 Author: Poul-Henning Kamp Date: Tue Jun 21 11:55:07 2011 +0000 Overhaul the Vary matching code to make it faster, by assuming (but do not trusting) that all objects under an objhdr have the same Vary string. Build a vary string for the request on the wrk->ws as we do the comparison and use it as a cache for subsequent comparisons. This will also be first step of sky's "pre-vary" diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index f8dedb1..22fa5ff 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -298,7 +298,11 @@ struct worker { uint32_t *wlb, *wlp, *wle; unsigned wlr; + /* Lookup stuff */ struct SHA256Context *sha256ctx; + uint8_t *vary_b; + uint8_t *vary_l; + uint8_t *vary_e; struct http_conn htc[1]; struct ws ws[1]; @@ -880,7 +884,7 @@ void RES_StreamPoll(const struct sess *sp); /* cache_vary.c */ struct vsb *VRY_Create(const struct sess *sp, const struct http *hp); -int VRY_Match(const struct sess *sp, const unsigned char *vary); +int VRY_Match(const struct sess *sp, const uint8_t *vary); /* cache_vcl.c */ void VCL_Init(void); diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 2a6dcc5..0324b57 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -330,6 +330,13 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) } CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); + AZ(sp->wrk->vary_b); + AZ(sp->wrk->vary_l); + AZ(sp->wrk->vary_e); + WS_Reserve(sp->wrk->ws, 0); + sp->wrk->vary_b = (void*)sp->wrk->ws->f; + sp->wrk->vary_e = (void*)sp->wrk->ws->r; + sp->wrk->vary_b[2] = '\0'; Lck_Lock(&oh->mtx); assert(oh->refcnt > 0); busy_oc = NULL; @@ -374,6 +381,11 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) } } + WS_ReleaseP(sp->wrk->ws, (void*)sp->wrk->vary_b); + sp->wrk->vary_b = NULL; + sp->wrk->vary_l = NULL; + sp->wrk->vary_e = NULL; + /* * If we have seen a busy object or the backend is unhealthy, and * we have an object in grace, use it, if req.grace is also diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 8eab103..27abf74 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -58,6 +58,7 @@ #include #include "cache.h" +#include "vend.h" #include "vct.h" struct vsb * @@ -131,63 +132,112 @@ VRY_Create(const struct sess *sp, const struct http *hp) return(sb); } +/* + * Find length of a vary entry + */ +static unsigned +vry_len(const uint8_t *p) +{ + unsigned l = vbe16dec(p); + + return (2 + p[2] + 2 + (l == 0xffff ? 0 : l)); +} + +/* + * Compare two vary entries + */ +static int +vry_cmp(const uint8_t * const *v1, uint8_t * const *v2) +{ + unsigned retval = 0; + + if (!memcmp(*v1, *v2, vry_len(*v1))) { + /* Same same */ + retval = 0; + } else if (memcmp((*v1) + 2, (*v2) + 2, (*v1)[2] + 2)) { + /* Different header */ + retval = 1; + } else if (params->http_gzip_support && + !strcasecmp(H_Accept_Encoding, (const char*)((*v1)+2))) { + /* + * If we do gzip processing, we do not vary on Accept-Encoding, + * because we want everybody to get the gzip'ed object, and + * varnish will gunzip as necessary. We implement the skip at + * check time, rather than create time, so that object in + * persistent storage can be used with either setting of + * http_gzip_support. + */ + retval = 0; + } else { + /* Same header, different content */ + retval = 2; + } + return (retval); +} + int VRY_Match(const struct sess *sp, const uint8_t *vary) { + uint8_t *vsp = sp->wrk->vary_b; char *h, *e; - int i, l, lh; - - while (1) { - l = vary[0] * 256 + vary[1]; - vary += 2; - if (!*vary) - break; - - if (params->http_gzip_support && - !strcasecmp(H_Accept_Encoding, (const char*)vary)) { - /* - * If we do gzip processing, we do not vary on - * Accept-Encoding, because we want everybody to - * get the gzip'ed object, and varnish will gunzip - * as necessary. We implement the skip at check - * time, rather than create time, so that object - * in persistent storage can be used with either - * setting of http_gzip_support. - */ - vary += *vary + 2; - if (l != 0xffff) - vary += l; - continue; + unsigned lh, ln; + int i, retval = 1, oflo = 0; + + AN(vsp); + while (vary[2]) { + i = vry_cmp(&vary, &vsp); + if (i == 1) { + /* Build a new entry */ + + i = http_GetHdr(sp->http, (const char*)(vary+2), &h); + if (i) { + /* Trim trailing space */ + e = strchr(h, '\0'); + while (e > h && vct_issp(e[-1])) + e--; + lh = e - h; + assert(lh < 0xffff); + } else { + e = h = NULL; + lh = 0xffff; + } + + /* Length of the entire new vary entry */ + ln = 2 + vary[2] + 2 + (lh == 0xffff ? 0 : lh); + if (vsp + ln >= sp->wrk->vary_e) { + vsp = sp->wrk->vary_b; + oflo = 1; + } + + /* We MUST have space for one entry */ + assert(vsp + ln < sp->wrk->vary_e); + + vbe16enc(vsp, (uint16_t)lh); + memcpy(vsp + 2, vary + 2, vary[2] + 2); + if (h != NULL && e != NULL) + memcpy(vsp + 2 + vsp[2] + 2, h, e - h); + + i = vry_cmp(&vary, &vsp); + assert(i != 1); /* hdr must be the same now */ } - /* Look for header */ - i = http_GetHdr(sp->http, (const char*)vary, &h); - vary += *vary + 2; - - /* Fail if we have the header, but shouldn't */ - if (i && l == 0xffff) - return (0); - /* or if we don't when we should */ - if (l != 0xffff && !i) - return (0); - - /* Nothing to match */ - if (!i) - continue; - - /* Trim trailing space */ - e = strchr(h, '\0'); - while (e > h && vct_issp(e[-1])) - e--; - - /* Fail if wrong length */ - lh = e - h; - if (lh != l) - return (0); + if (i != 0) + retval = 0; + vsp += vry_len(vsp); + vary += vry_len(vary); + } + if (vsp + 3 > sp->wrk->vary_e) + oflo = 1; - /* or if wrong contents */ - if (memcmp(h, vary, l)) - return (0); - vary += l; + if (oflo) { + /* XXX: Should log this */ + vsp = sp->wrk->vary_b; } - return (1); + vsp[0] = 0xff; + vsp[1] = 0xff; + vsp[2] = 0; + if (oflo) + sp->wrk->vary_l = NULL; + else + sp->wrk->vary_l = vsp + 3; + return (retval); } From perbu at varnish-cache.org Wed Jun 22 08:03:54 2011 From: perbu at varnish-cache.org (Per Buer) Date: Wed, 22 Jun 2011 10:03:54 +0200 Subject: [master] 1354bed probes outside directors Message-ID: commit 1354bed1999c463a35b3f451d4b51f42b25e6403 Author: Per Buer Date: Wed Jun 22 10:03:51 2011 +0200 probes outside directors diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 46efc67..d0d9d39 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -72,9 +72,6 @@ available where. VCL has if tests, but no loops. -You may log arbitrary strings to the shared memory log with the -keyword *log*. - The contents of another VCL file may be inserted at any point in the code by using the *include* keyword followed by the name of the other file as a quoted string. @@ -236,7 +233,8 @@ us to consider the backend healthy. .initial is how many of the probes are considered good when Varnish starts - defaults to the same amount as the threshold. -A backend with a probe can be defined like this::: +A backend with a probe can be defined like this, together with the +backend or director::: backend www { .host = "www.example.com"; @@ -250,18 +248,34 @@ A backend with a probe can be defined like this::: } } -It is also possible to specify the raw HTTP request:: +Or it can be defined separately and then referenced::: + + probe healthcheck { + .url = "/status.cgi"; + .interval = 60s; + .timeout = 0.3 s; + .window = 8; + .threshold = 3; + .initial = 3; + } backend www { .host = "www.example.com"; .port = "http"; - .probe = { + .probe = healthcheck; + } + +If you have many backends this can simplify the config a lot. + + +It is also possible to specify the raw HTTP request:: + + probe rawprobe { # NB: \r\n automatically inserted after each string! .request = "GET / HTTP/1.1" "Host: www.foo.bar" "Connection: close"; - } } ACLs @@ -819,9 +833,11 @@ based on the request URL::: default_ttl run-time parameter, as that only affects document for which the backend did not specify a TTL::: + import std; # needed for std.log + sub vcl_fetch { if (beresp.ttl < 120s) { - log "Adjusting TTL"; + std.log "Adjusting TTL"; set beresp.ttl = 120s; } } @@ -876,6 +892,7 @@ SEE ALSO ======== * varnishd(1) +* vmod_std(7) HISTORY ======= From phk at varnish-cache.org Wed Jun 22 08:42:34 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 10:42:34 +0200 Subject: [master] cdeea12 Don't overwrite reference results unless told to Message-ID: commit cdeea1235a6a1fe78e96327ad290d58547b4e5af Author: Poul-Henning Kamp Date: Wed Jun 22 08:31:56 2011 +0000 Don't overwrite reference results unless told to diff --git a/bin/varnishd/flint.sh b/bin/varnishd/flint.sh index d163374..d87fe66 100755 --- a/bin/varnishd/flint.sh +++ b/bin/varnishd/flint.sh @@ -20,4 +20,6 @@ if [ -f _.fl.old ] ; then diff -u _.fl.old _.fl fi -mv _.fl _.fl.old +if [ "x$1" = "x-ok" ] ; then + mv _.fl _.fl.old +fi From phk at varnish-cache.org Wed Jun 22 08:42:34 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 10:42:34 +0200 Subject: [master] ac1e367 Move the setup/teardown of requests vary prediction space from cache_hash to cache_center. Message-ID: commit ac1e3675fe4e573315bc2c4874869c298b206b9d Author: Poul-Henning Kamp Date: Wed Jun 22 08:34:46 2011 +0000 Move the setup/teardown of requests vary prediction space from cache_hash to cache_center. diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 4a17c56..5b55d58 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -1028,13 +1028,28 @@ cnt_lookup(struct sess *sp) struct objcore *oc; struct object *o; struct objhead *oh; + struct worker *wrk; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); + wrk = sp->wrk; + AZ(wrk->vary_b); + AZ(wrk->vary_l); + AZ(wrk->vary_e); + (void)WS_Reserve(wrk->ws, 0); + wrk->vary_b = (void*)wrk->ws->f; + wrk->vary_e = (void*)wrk->ws->r; + wrk->vary_b[2] = '\0'; + oc = HSH_Lookup(sp, &oh); + WS_Release(wrk->ws, 0); + wrk->vary_b = NULL; + wrk->vary_l = NULL; + wrk->vary_e = NULL; + if (oc == NULL) { /* * We lost the session to a busy object, disembark the diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 0324b57..2a6dcc5 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -330,13 +330,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) } CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); - AZ(sp->wrk->vary_b); - AZ(sp->wrk->vary_l); - AZ(sp->wrk->vary_e); - WS_Reserve(sp->wrk->ws, 0); - sp->wrk->vary_b = (void*)sp->wrk->ws->f; - sp->wrk->vary_e = (void*)sp->wrk->ws->r; - sp->wrk->vary_b[2] = '\0'; Lck_Lock(&oh->mtx); assert(oh->refcnt > 0); busy_oc = NULL; @@ -381,11 +374,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) } } - WS_ReleaseP(sp->wrk->ws, (void*)sp->wrk->vary_b); - sp->wrk->vary_b = NULL; - sp->wrk->vary_l = NULL; - sp->wrk->vary_e = NULL; - /* * If we have seen a busy object or the backend is unhealthy, and * we have an object in grace, use it, if req.grace is also From phk at varnish-cache.org Wed Jun 22 08:42:35 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 10:42:35 +0200 Subject: [master] a20d6af Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit a20d6afad722d306b8f981bfecb53437cd685f5f Merge: ac1e367 1354bed Author: Poul-Henning Kamp Date: Wed Jun 22 08:42:30 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Wed Jun 22 09:30:21 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 11:30:21 +0200 Subject: [master] b64281a Make sure we neuter the next entry after the one we just created to prevent old junk on the workspace from being taken for valid. Message-ID: commit b64281a7a9f7ce74daad6763c9d34a444c8ac00a Author: Poul-Henning Kamp Date: Wed Jun 22 09:29:46 2011 +0000 Make sure we neuter the next entry after the one we just created to prevent old junk on the workspace from being taken for valid. diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 27abf74..01816f6 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -209,13 +209,19 @@ VRY_Match(const struct sess *sp, const uint8_t *vary) oflo = 1; } - /* We MUST have space for one entry */ - assert(vsp + ln < sp->wrk->vary_e); + /* + * We MUST have space for one entry and the end marker + * after it, which prevents old junk from confusing us + */ + assert(vsp + ln + 2 < sp->wrk->vary_e); vbe16enc(vsp, (uint16_t)lh); memcpy(vsp + 2, vary + 2, vary[2] + 2); - if (h != NULL && e != NULL) + if (h != NULL && e != NULL) { memcpy(vsp + 2 + vsp[2] + 2, h, e - h); + vsp[2 + vary[2] + 2 + (e - h) + 2] = '\0'; + } else + vsp[2 + vary[2] + 2 + 2] = '\0'; i = vry_cmp(&vary, &vsp); assert(i != 1); /* hdr must be the same now */ From phk at varnish-cache.org Wed Jun 22 10:51:50 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 12:51:50 +0200 Subject: [master] 91f22a1 Remove unused/unreferenced stuff. Message-ID: commit 91f22a160fe2f63d4a85d525fa0e70b4c3c9395e Author: Poul-Henning Kamp Date: Wed Jun 22 10:51:08 2011 +0000 Remove unused/unreferenced stuff. Not detected by: FlexeLint 9.00f Detected by: FlexeLint 9.00g diff --git a/include/libvarnish.h b/include/libvarnish.h index 317dc9e..157a64e 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -104,8 +104,6 @@ int vtmpfile(char *); char *vreadfile(const char *pfx, const char *fn, ssize_t *sz); char *vreadfd(int fd, ssize_t *sz); -const char* VCS_Version(void); - /* Safe printf into a fixed-size buffer */ #define bprintf(buf, fmt, ...) \ do { \ diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index 3198ce1..f90c1b1 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -211,44 +211,6 @@ Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port) } /*-------------------------------------------------------------------- - * When a new VCL is loaded, it is likely to contain backend declarations - * identical to other loaded VCL programs, and we want to reuse the state - * of those in order to not have to relearn statistics, DNS etc. - * - * This function emits a space separated text-string of the tokens which - * define a given backend which can be used to determine "identical backend" - * in that context. - */ - -void -vcc_EmitBeIdent(const struct vcc *tl, struct vsb *v, - int serial, const struct token *first, const struct token *last) -{ - - assert(first != last); - VSB_printf(v, "\t.ident ="); - if (serial >= 0) { - VSB_printf(v, "\n\t \"%.*s %.*s [%d] \"", - PF(tl->t_policy), PF(tl->t_dir), serial); - } else { - VSB_printf(v, "\n\t \"%.*s %.*s \"", - PF(tl->t_policy), PF(tl->t_dir)); - } - while (1) { - if (first->dec != NULL) - VSB_printf(v, "\n\t \"\\\"\" %.*s \"\\\" \"", - PF(first)); - else - VSB_printf(v, "\n\t \"%.*s \"", PF(first)); - if (first == last) - break; - first = VTAILQ_NEXT(first, list); - AN(first); - } - VSB_printf(v, ",\n"); -} - -/*-------------------------------------------------------------------- * Parse a backend probe specification */ diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h index c90d225..b8c8454 100644 --- a/lib/libvcl/vcc_compile.h +++ b/lib/libvcl/vcc_compile.h @@ -210,8 +210,6 @@ void vcc_IsField(struct vcc *tl, struct token **t, struct fld_spec *fs); void vcc_FieldsOk(struct vcc *tl, const struct fld_spec *fs); void Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port); -void vcc_EmitBeIdent(const struct vcc *tl, struct vsb *v, - int serial, const struct token *first, const struct token *last); /* vcc_compile.c */ extern struct method method_tab[]; @@ -245,7 +243,6 @@ parsedirector_f vcc_ParseRoundRobinDirector; void vcc_RTimeVal(struct vcc *tl, double *); void vcc_TimeVal(struct vcc *tl, double *); unsigned vcc_UintVal(struct vcc *tl); -double vcc_DoubleVal(struct vcc *tl); void vcc_Expr(struct vcc *tl, enum var_type typ); void vcc_Expr_Call(struct vcc *tl, const struct symbol *sym); void vcc_Expr_Init(struct vcc *tl); @@ -267,8 +264,6 @@ sym_wildcard_t vcc_Stv_Wildcard; /* vcc_string.c */ char *vcc_regexp(struct vcc *tl); -int vcc_StringVal(struct vcc *tl); -void vcc_ExpectedStringval(struct vcc *tl); /* vcc_symb.c */ struct symbol *VCC_AddSymbolStr(struct vcc *tl, const char *name, enum symkind); @@ -303,8 +298,6 @@ void vcc_AddToken(struct vcc *tl, unsigned tok, const char *b, sym_wildcard_t vcc_Var_Wildcard; const struct var *vcc_FindVar(struct vcc *tl, const struct token *t, int wr_access, const char *use); -void vcc_VarVal(struct vcc *tl, const struct var *vp, - const struct token *vt); /* vcc_vmod.c */ void vcc_ParseImport(struct vcc *tl); diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 82a8aba..9a504e5 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -145,7 +145,7 @@ vcc_NumVal(struct vcc *tl, double *d, int *frac) vcc_NextToken(tl); } -double +static double vcc_DoubleVal(struct vcc *tl) { double d; diff --git a/lib/libvcl/vcc_var.c b/lib/libvcl/vcc_var.c index 94a5fb9..3871dbc 100644 --- a/lib/libvcl/vcc_var.c +++ b/lib/libvcl/vcc_var.c @@ -121,29 +121,3 @@ vcc_FindVar(struct vcc *tl, const struct token *t, int wr_access, vcc_ErrWhere(tl, t); return (NULL); } - -/*--------------------------------------------------------------------*/ - -void -vcc_VarVal(struct vcc *tl, const struct var *vp, const struct token *vt) -{ - double d; - - if (vp->fmt == TIME) { - vcc_TimeVal(tl, &d); - ERRCHK(tl); - Fb(tl, 0, "%g", d); - } else if (vp->fmt == DURATION) { - vcc_RTimeVal(tl, &d); - ERRCHK(tl); - Fb(tl, 0, "%g", d); - } else if (vp->fmt == INT) { - Fb(tl, 0, "%u", vcc_UintVal(tl)); - } else { - AN(vt); - VSB_printf(tl->sb, - "Variable has incompatible type.\n"); - vcc_ErrWhere(tl, vt); - return; - } -} From phk at varnish-cache.org Wed Jun 22 10:53:11 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 12:53:11 +0200 Subject: [master] 403a361 Don't force a rerun to save reference if we just ran it. Message-ID: commit 403a361928841ab66d52471f0a439480aa125a98 Author: Poul-Henning Kamp Date: Wed Jun 22 10:52:47 2011 +0000 Don't force a rerun to save reference if we just ran it. diff --git a/bin/varnishd/flint.sh b/bin/varnishd/flint.sh index d87fe66..690e445 100755 --- a/bin/varnishd/flint.sh +++ b/bin/varnishd/flint.sh @@ -1,5 +1,11 @@ #!/bin/sh +if [ "x$1" = "x-ok" -a -f _.fl ] ; then + echo "Saved as reference" + mv _.fl _.fl.old + exit 0 +fi + flexelint \ ../flint.lnt \ flint.lnt \ @@ -21,5 +27,6 @@ if [ -f _.fl.old ] ; then fi if [ "x$1" = "x-ok" ] ; then + echo "Saved as reference" mv _.fl _.fl.old fi From phk at varnish-cache.org Wed Jun 22 11:23:10 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 13:23:10 +0200 Subject: [master] 8f85e38 Move request vary string from wrk to sess Message-ID: commit 8f85e380960fe09cff72c6e108789f247c08a065 Author: Poul-Henning Kamp Date: Wed Jun 22 10:39:47 2011 +0000 Move request vary string from wrk to sess diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 22fa5ff..1d3db55 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -300,9 +300,6 @@ struct worker { /* Lookup stuff */ struct SHA256Context *sha256ctx; - uint8_t *vary_b; - uint8_t *vary_l; - uint8_t *vary_e; struct http_conn htc[1]; struct ws ws[1]; @@ -554,6 +551,11 @@ struct sess { unsigned char digest[DIGEST_LEN]; + /* Built Vary string */ + uint8_t *vary_b; + uint8_t *vary_l; + uint8_t *vary_e; + struct http_conn htc[1]; /* Timestamps, all on TIM_real() timescale */ @@ -884,7 +886,7 @@ void RES_StreamPoll(const struct sess *sp); /* cache_vary.c */ struct vsb *VRY_Create(const struct sess *sp, const struct http *hp); -int VRY_Match(const struct sess *sp, const uint8_t *vary); +int VRY_Match(struct sess *sp, const uint8_t *vary); /* cache_vcl.c */ void VCL_Init(void); diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 5b55d58..23ad92f 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -1028,28 +1028,23 @@ cnt_lookup(struct sess *sp) struct objcore *oc; struct object *o; struct objhead *oh; - struct worker *wrk; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); - - wrk = sp->wrk; - AZ(wrk->vary_b); - AZ(wrk->vary_l); - AZ(wrk->vary_e); - (void)WS_Reserve(wrk->ws, 0); - wrk->vary_b = (void*)wrk->ws->f; - wrk->vary_e = (void*)wrk->ws->r; - wrk->vary_b[2] = '\0'; + if (sp->hash_objhead == NULL) { + /* Not a waiting list return */ + AZ(sp->vary_b); + AZ(sp->vary_l); + AZ(sp->vary_e); + (void)WS_Reserve(sp->ws, 0); + sp->vary_b = (void*)sp->ws->f; + sp->vary_e = (void*)sp->ws->r; + sp->vary_b[2] = '\0'; + } oc = HSH_Lookup(sp, &oh); - WS_Release(wrk->ws, 0); - wrk->vary_b = NULL; - wrk->vary_l = NULL; - wrk->vary_e = NULL; - if (oc == NULL) { /* * We lost the session to a busy object, disembark the @@ -1060,6 +1055,7 @@ cnt_lookup(struct sess *sp) return (1); } + CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); @@ -1067,6 +1063,14 @@ cnt_lookup(struct sess *sp) if (oc->flags & OC_F_BUSY) { sp->wrk->stats.cache_miss++; + if (sp->vary_l != NULL) + WS_ReleaseP(sp->ws, (void*)sp->vary_l); + else + WS_Release(sp->ws, 0); + sp->vary_b = NULL; + sp->vary_l = NULL; + sp->vary_e = NULL; + sp->objcore = oc; sp->step = STP_MISS; return (0); @@ -1076,6 +1080,11 @@ cnt_lookup(struct sess *sp) CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); sp->obj = o; + WS_Release(sp->ws, 0); + sp->vary_b = NULL; + sp->vary_l = NULL; + sp->vary_e = NULL; + if (oc->flags & OC_F_PASS) { sp->wrk->stats.cache_hitpass++; WSP(sp, SLT_HitPass, "%u", sp->obj->xid); diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 01816f6..89e1675 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -176,9 +176,9 @@ vry_cmp(const uint8_t * const *v1, uint8_t * const *v2) } int -VRY_Match(const struct sess *sp, const uint8_t *vary) +VRY_Match(struct sess *sp, const uint8_t *vary) { - uint8_t *vsp = sp->wrk->vary_b; + uint8_t *vsp = sp->vary_b; char *h, *e; unsigned lh, ln; int i, retval = 1, oflo = 0; @@ -204,8 +204,8 @@ VRY_Match(const struct sess *sp, const uint8_t *vary) /* Length of the entire new vary entry */ ln = 2 + vary[2] + 2 + (lh == 0xffff ? 0 : lh); - if (vsp + ln >= sp->wrk->vary_e) { - vsp = sp->wrk->vary_b; + if (vsp + ln >= sp->vary_e) { + vsp = sp->vary_b; oflo = 1; } @@ -213,7 +213,7 @@ VRY_Match(const struct sess *sp, const uint8_t *vary) * We MUST have space for one entry and the end marker * after it, which prevents old junk from confusing us */ - assert(vsp + ln + 2 < sp->wrk->vary_e); + assert(vsp + ln + 2 < sp->vary_e); vbe16enc(vsp, (uint16_t)lh); memcpy(vsp + 2, vary + 2, vary[2] + 2); @@ -231,19 +231,19 @@ VRY_Match(const struct sess *sp, const uint8_t *vary) vsp += vry_len(vsp); vary += vry_len(vary); } - if (vsp + 3 > sp->wrk->vary_e) + if (vsp + 3 > sp->vary_e) oflo = 1; if (oflo) { /* XXX: Should log this */ - vsp = sp->wrk->vary_b; + vsp = sp->vary_b; } vsp[0] = 0xff; vsp[1] = 0xff; vsp[2] = 0; if (oflo) - sp->wrk->vary_l = NULL; + sp->vary_l = NULL; else - sp->wrk->vary_l = vsp + 3; + sp->vary_l = vsp + 3; return (retval); } From phk at varnish-cache.org Wed Jun 22 11:23:12 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 13:23:12 +0200 Subject: [master] ca5fe96 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit ca5fe96964088e3ff44df22ea678a7700ac3a762 Merge: 8f85e38 403a361 Author: Poul-Henning Kamp Date: Wed Jun 22 11:00:50 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Wed Jun 22 14:29:12 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 16:29:12 +0200 Subject: [master] bd96df2 Make all three gzip parameter varnish parameters: gzip_level, gzip_window and gzip_memlevel. Message-ID: commit bd96df29180f52ccdc399feff9659dd03477d11c Author: Poul-Henning Kamp Date: Wed Jun 22 14:28:36 2011 +0000 Make all three gzip parameter varnish parameters: gzip_level, gzip_window and gzip_memlevel. Still same pessimal values though. diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index e9ae902..f320a0a 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -202,8 +202,8 @@ VGZ_NewGzip(struct sess *sp, const char *id) i = deflateInit2(&vg->vz, params->gzip_level, /* Level */ Z_DEFLATED, /* Method */ - 16 + 8, /* Window bits (16=gzip + 15) */ - 1, /* memLevel */ + 16 + params->gzip_window, /* Window bits (16=gzip + 15) */ + params->gzip_memlevel, /* memLevel */ Z_DEFAULT_STRATEGY); if (i != Z_OK) printf("deflateInit2() = %d\n", i); diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h index 16828ed..084d5dc 100644 --- a/bin/varnishd/heritage.h +++ b/bin/varnishd/heritage.h @@ -204,6 +204,8 @@ struct params { unsigned gzip_stack_buffer; unsigned gzip_tmp_space; unsigned gzip_level; + unsigned gzip_window; + unsigned gzip_memlevel; double critbit_cooloff; diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index 1caa563..1b996e5 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -887,6 +887,14 @@ static const struct parspec input_parspec[] = { "Gzip compression level: 0=debug, 1=fast, 9=best", 0, "6", ""}, + { "gzip_window", tweak_uint, &master.gzip_window, 8, 15, + "Gzip window size 8=least, 15=most compression", + 0, + "8", ""}, + { "gzip_window", tweak_uint, &master.gzip_memlevel, 1, 9, + "Gzip memory level 1=least, 9=most compression", + 0, + "1", ""}, { "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer, 2048, UINT_MAX, "Size of stack buffer used for gzip processing.\n" From phk at varnish-cache.org Wed Jun 22 14:49:33 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 22 Jun 2011 16:49:33 +0200 Subject: [master] a343a0d Beef the gzip parameters up to the usual defaults: window=15 and memlevel 8. Message-ID: commit a343a0dad8bd4faa7ad46187f5914e5d4fefb852 Author: Poul-Henning Kamp Date: Wed Jun 22 14:48:57 2011 +0000 Beef the gzip parameters up to the usual defaults: window=15 and memlevel 8. Fix testcases which depend on older values. diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index 1b996e5..26fcb31 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -888,13 +888,15 @@ static const struct parspec input_parspec[] = { 0, "6", ""}, { "gzip_window", tweak_uint, &master.gzip_window, 8, 15, - "Gzip window size 8=least, 15=most compression", + "Gzip window size 8=least, 15=most compression.\n" + "Memory impact is 8=1k, 9=2k, ... 15=128k.", 0, - "8", ""}, - { "gzip_window", tweak_uint, &master.gzip_memlevel, 1, 9, - "Gzip memory level 1=least, 9=most compression", + "15", ""}, + { "gzip_memlevel", tweak_uint, &master.gzip_memlevel, 1, 9, + "Gzip memory level 1=slow/least, 9=fast/most compression.\n" + "Memory impact is 1=1k, 2=2k, ... 9=256k.", 0, - "1", ""}, + "8", ""}, { "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer, 2048, UINT_MAX, "Size of stack buffer used for gzip processing.\n" diff --git a/bin/varnishtest/tests/e00022.vtc b/bin/varnishtest/tests/e00022.vtc index e402c5e..39302b4 100644 --- a/bin/varnishtest/tests/e00022.vtc +++ b/bin/varnishtest/tests/e00022.vtc @@ -26,6 +26,8 @@ varnish v1 -arg "-p sess_workspace=131072 -p thread_pool_stack=262144" -vcl+back varnish v1 -cliok "param.set esi_syntax 0xc" varnish v1 -cliok "param.set http_gzip_support true" varnish v1 -cliok "param.set gzip_tmp_space 1" +varnish v1 -cliok "param.set gzip_window 8" +varnish v1 -cliok "param.set gzip_memlevel 1" client c1 { txreq -hdr "Accept-Encoding: gzip" diff --git a/bin/varnishtest/tests/g00002.vtc b/bin/varnishtest/tests/g00002.vtc index 4d713c7..dba75ae 100644 --- a/bin/varnishtest/tests/g00002.vtc +++ b/bin/varnishtest/tests/g00002.vtc @@ -11,7 +11,10 @@ server s1 { txresp -body {

} } -start -varnish v1 -cliok "param.set http_gzip_support true" -vcl+backend { +varnish v1 \ + -cliok "param.set http_gzip_support true" \ + -cliok "param.set gzip_memlevel 1" \ + -vcl+backend { sub vcl_fetch { set beresp.do_esi = true; From tfheen at varnish-cache.org Mon Jun 27 07:48:25 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 27 Jun 2011 09:48:25 +0200 Subject: [3.0] 047edc4 Use the correct source file in spec file. Message-ID: commit 047edc414aabd2d1764f8213a567add514325cf2 Author: Tollef Fog Heen Date: Fri Jun 17 17:38:59 2011 +0200 Use the correct source file in spec file. diff --git a/redhat/varnish.spec b/redhat/varnish.spec index a00bb76..ae1b87e 100644 --- a/redhat/varnish.spec +++ b/redhat/varnish.spec @@ -6,7 +6,7 @@ License: BSD Group: System Environment/Daemons URL: http://www.varnish-cache.org/ #Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz -Source0: %{name}-3.0.0-beta2.tar.gz +Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To build from git, start with a make dist, see redhat/README.redhat # You will need at least automake autoconf libtool python-docutils From tfheen at varnish-cache.org Mon Jun 27 07:48:25 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 27 Jun 2011 09:48:25 +0200 Subject: [3.0] 068d423 probes outside directors Message-ID: commit 068d42398aeb54cc3483b02313095feea72a29f1 Author: Per Buer Date: Wed Jun 22 10:03:51 2011 +0200 probes outside directors diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 46efc67..d0d9d39 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -72,9 +72,6 @@ available where. VCL has if tests, but no loops. -You may log arbitrary strings to the shared memory log with the -keyword *log*. - The contents of another VCL file may be inserted at any point in the code by using the *include* keyword followed by the name of the other file as a quoted string. @@ -236,7 +233,8 @@ us to consider the backend healthy. .initial is how many of the probes are considered good when Varnish starts - defaults to the same amount as the threshold. -A backend with a probe can be defined like this::: +A backend with a probe can be defined like this, together with the +backend or director::: backend www { .host = "www.example.com"; @@ -250,18 +248,34 @@ A backend with a probe can be defined like this::: } } -It is also possible to specify the raw HTTP request:: +Or it can be defined separately and then referenced::: + + probe healthcheck { + .url = "/status.cgi"; + .interval = 60s; + .timeout = 0.3 s; + .window = 8; + .threshold = 3; + .initial = 3; + } backend www { .host = "www.example.com"; .port = "http"; - .probe = { + .probe = healthcheck; + } + +If you have many backends this can simplify the config a lot. + + +It is also possible to specify the raw HTTP request:: + + probe rawprobe { # NB: \r\n automatically inserted after each string! .request = "GET / HTTP/1.1" "Host: www.foo.bar" "Connection: close"; - } } ACLs @@ -819,9 +833,11 @@ based on the request URL::: default_ttl run-time parameter, as that only affects document for which the backend did not specify a TTL::: + import std; # needed for std.log + sub vcl_fetch { if (beresp.ttl < 120s) { - log "Adjusting TTL"; + std.log "Adjusting TTL"; set beresp.ttl = 120s; } } @@ -876,6 +892,7 @@ SEE ALSO ======== * varnishd(1) +* vmod_std(7) HISTORY ======= From tfheen at varnish-cache.org Mon Jun 27 07:54:34 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 27 Jun 2011 09:54:34 +0200 Subject: [master] 2b56653 Minor doc fixup Message-ID: commit 2b566531d08e68027fd4ae3709d3aebd26e07c71 Author: Tollef Fog Heen Date: Mon Jun 27 09:54:28 2011 +0200 Minor doc fixup diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index d0d9d39..8861404 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -897,10 +897,10 @@ SEE ALSO HISTORY ======= -The VCL language was developed by Poul-Henning Kamp in cooperation -with Verdens Gang AS, Varnish Software AS and Varnish Software. This manual -page was written by Dag-Erling Sm?rgrav and later edited by -Poul-Henning Kamp and Per Buer. +VCL was developed by Poul-Henning Kamp in cooperation with Verdens +Gang AS, Redpill Linpro and Varnish Software. This manual page was +written by Dag-Erling Sm?rgrav and later edited by Poul-Henning Kamp +and Per Buer. COPYRIGHT ========= From tfheen at varnish-cache.org Mon Jun 27 07:57:04 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 27 Jun 2011 09:57:04 +0200 Subject: [3.0] 32f3279 Minor doc fixup Message-ID: commit 32f327992f849a7dee136d845e2d09a37e98b999 Author: Tollef Fog Heen Date: Mon Jun 27 09:54:28 2011 +0200 Minor doc fixup diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index d0d9d39..8861404 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -897,10 +897,10 @@ SEE ALSO HISTORY ======= -The VCL language was developed by Poul-Henning Kamp in cooperation -with Verdens Gang AS, Varnish Software AS and Varnish Software. This manual -page was written by Dag-Erling Sm?rgrav and later edited by -Poul-Henning Kamp and Per Buer. +VCL was developed by Poul-Henning Kamp in cooperation with Verdens +Gang AS, Redpill Linpro and Varnish Software. This manual page was +written by Dag-Erling Sm?rgrav and later edited by Poul-Henning Kamp +and Per Buer. COPYRIGHT ========= From tfheen at varnish-cache.org Mon Jun 27 08:00:12 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Mon, 27 Jun 2011 10:00:12 +0200 Subject: [3.0] 48874f8 Fix up varnishlog matching example Message-ID: commit 48874f83e7d36b5a3061ee8530f311cfab903341 Author: Tollef Fog Heen Date: Mon Jun 27 10:00:03 2011 +0200 Fix up varnishlog matching example diff --git a/doc/sphinx/reference/varnishlog.rst b/doc/sphinx/reference/varnishlog.rst index 8f67765..c0d73c9 100644 --- a/doc/sphinx/reference/varnishlog.rst +++ b/doc/sphinx/reference/varnishlog.rst @@ -149,7 +149,7 @@ The following command line simply copies all log entries to a log file::: The following command line reads that same log file and displays requests for the front page::: - $ varnishlog -r /var/log/varnish.log -c -o RxURL '^/$' + $ varnishlog -r /var/log/varnish.log -c -m 'RxURL:^/$' SEE ALSO ======== From phk at varnish-cache.org Mon Jun 27 11:13:55 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 27 Jun 2011 13:13:55 +0200 Subject: [master] 6c51567 Enforce that oc_getobj() does not work on BUSY objcores. Message-ID: commit 6c51567a2724a8da62b3e2af8845e39aeb3d335f Author: Poul-Henning Kamp Date: Mon Jun 27 11:12:42 2011 +0000 Enforce that oc_getobj() does not work on BUSY objcores. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 1d3db55..eb7077c 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -434,6 +434,7 @@ oc_getobj(struct worker *wrk, struct objcore *oc) { CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); + AZ(oc->flags & OC_F_BUSY); AN(oc->methods); AN(oc->methods->getobj); return (oc->methods->getobj(wrk, oc)); diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 2a6dcc5..d5c5ebe 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -594,7 +594,6 @@ HSH_Unbusy(const struct sess *sp) AssertObjBusy(o); AN(oc->ban); - assert(oc_getobj(sp->wrk, oc) == o); assert(oc->refcnt > 0); assert(oh->refcnt > 0); if (o->ws_o->overflow) @@ -613,6 +612,7 @@ HSH_Unbusy(const struct sess *sp) hsh_rush(oh); AN(oc->ban); Lck_Unlock(&oh->mtx); + assert(oc_getobj(sp->wrk, oc) == o); } void From phk at varnish-cache.org Mon Jun 27 12:12:58 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 27 Jun 2011 14:12:58 +0200 Subject: [master] 9cc19dd Introduce the "busyobj" structure which is only valid for busy objects. Message-ID: commit 9cc19dd79740f6788cae2c4fed590e05523bb84b Author: Poul-Henning Kamp Date: Mon Jun 27 12:11:41 2011 +0000 Introduce the "busyobj" structure which is only valid for busy objects. Use it to hold the derived vary string for the request (if any) and skip busy objects with non-matching Vary during hash lookup. Idea by: sky diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index eb7077c..a875071 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -97,6 +97,7 @@ struct director; struct object; struct objhead; struct objcore; +struct busyobj; struct storage; struct workreq; struct vrt_backend; @@ -281,6 +282,7 @@ struct worker { struct objhead *nobjhead; struct objcore *nobjcore; struct waitinglist *nwaitinglist; + struct busyobj *nbusyobj; void *nhashpriv; struct dstat stats; @@ -416,6 +418,7 @@ struct objcore { void *priv; unsigned priv2; struct objhead *objhead; + struct busyobj *busyobj; double timer_when; unsigned flags; #define OC_F_BUSY (1<<1) @@ -470,7 +473,16 @@ oc_getlru(const struct objcore *oc) return (oc->methods->getlru(oc)); } +/* Busy Object structure ---------------------------------------------*/ + +struct busyobj { + unsigned magic; +#define BUSYOBJ_MAGIC 0x23b95567 + uint8_t *vary; +}; + /* Object structure --------------------------------------------------*/ + VTAILQ_HEAD(storagehead, storage); struct object { diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index d5c5ebe..6fdff15 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -111,6 +111,11 @@ HSH_Prealloc(const struct sess *sp) } CHECK_OBJ_NOTNULL(w->nwaitinglist, WAITINGLIST_MAGIC); + if (w->nbusyobj == NULL) { + ALLOC_OBJ(w->nbusyobj, BUSYOBJ_MAGIC); + XXXAN(w->nbusyobj); + } + if (hash->prep != NULL) hash->prep(sp); } @@ -342,8 +347,15 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) assert(oc->objhead == oh); if (oc->flags & OC_F_BUSY) { - if (!sp->hash_ignore_busy) - busy_oc = oc; + CHECK_OBJ_NOTNULL(oc->busyobj, BUSYOBJ_MAGIC); + if (sp->hash_ignore_busy) + continue; + + if (oc->busyobj->vary != NULL && + !VRY_Match(sp, oc->busyobj->vary)) + continue; + + busy_oc = oc; continue; } @@ -445,6 +457,10 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) AN(oc->flags & OC_F_BUSY); oc->refcnt = 1; + w->nbusyobj->vary = sp->vary_b; + oc->busyobj = w->nbusyobj; + w->nbusyobj = NULL; + /* * Busy objects go on the tail, so they will not trip up searches. * HSH_Unbusy() will move them to the front. @@ -609,6 +625,9 @@ HSH_Unbusy(const struct sess *sp) VTAILQ_REMOVE(&oh->objcs, oc, list); VTAILQ_INSERT_HEAD(&oh->objcs, oc, list); oc->flags &= ~OC_F_BUSY; + AZ(sp->wrk->nbusyobj); + sp->wrk->nbusyobj = oc->busyobj; + oc->busyobj = NULL; hsh_rush(oh); AN(oc->ban); Lck_Unlock(&oh->mtx); diff --git a/bin/varnishtest/tests/c00043.vtc b/bin/varnishtest/tests/c00043.vtc new file mode 100644 index 0000000..46cc4e1 --- /dev/null +++ b/bin/varnishtest/tests/c00043.vtc @@ -0,0 +1,44 @@ +varnishtest "predictive vary" + + +server s1 { + rxreq + txresp -hdr "Vary: foo" -bodylen 1 + rxreq + sema r2 sync 2 + sema r1 sync 2 + txresp -hdr "Vary: foo" -bodylen 2 +} -start + +server s2 { + rxreq + txresp -hdr "Vary: foo" -bodylen 3 +} -start + +varnish v1 -vcl+backend { + sub vcl_recv { + if (req.http.bar) { + set req.backend = s2; + } + } +} -start + +client c1 { + txreq -hdr "Foo: vary1" + rxresp + expect resp.bodylen == 1 + txreq -hdr "Foo: vary2" + rxresp + expect resp.bodylen == 2 +} -start + +client c2 { + sema r2 sync 2 + txreq -hdr "Foo: vary3" -hdr "bar: yes" + rxresp + sema r1 sync 2 + expect resp.bodylen == 3 +} -start + +client c1 -wait +client c2 -wait From perbu at varnish-cache.org Wed Jun 29 21:14:25 2011 From: perbu at varnish-cache.org (Per Buer) Date: Wed, 29 Jun 2011 23:14:25 +0200 Subject: [master] 91023bb obj and beresp.cacheable are gone Message-ID: commit 91023bb8dca3d8dba6ec4799be4256fcef83ed12 Author: Per Buer Date: Wed Jun 29 23:14:22 2011 +0200 obj and beresp.cacheable are gone diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 8861404..b9aaddc 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -681,15 +681,6 @@ beresp.status beresp.response The HTTP status message returned by the server. -beresp.cacheable - True if the request resulted in a cacheable response. A response is - considered cacheable if HTTP status code is 200, 203, 300, 301, 302, - 404 or 410 and pass wasn't called in vcl_recv. If however, both the - TTL and the grace time for the response are 0 beresp.cacheable will - be 0. - - beresp.cacheable is writable. - beresp.ttl The object's remaining time to live, in seconds. beresp.ttl is writable. @@ -706,10 +697,6 @@ obj.status obj.response The HTTP status message returned by the server. -obj.cacheable - True if the object had beresp.cacheable. Unless you've forced delivery - in your VCL obj.cacheable will always be true. - obj.ttl The object's remaining time to live, in seconds. obj.ttl is writable. From perbu at varnish-cache.org Thu Jun 30 08:23:38 2011 From: perbu at varnish-cache.org (Per Buer) Date: Thu, 30 Jun 2011 10:23:38 +0200 Subject: [master] 85f39f0 Explain what a purge is. Message-ID: commit 85f39f0d4dfb1e351e19095688e387416de172b5 Author: Per Buer Date: Thu Jun 30 10:18:36 2011 +0200 Explain what a purge is. diff --git a/doc/sphinx/tutorial/purging.rst b/doc/sphinx/tutorial/purging.rst index bd00e49..284080a 100644 --- a/doc/sphinx/tutorial/purging.rst +++ b/doc/sphinx/tutorial/purging.rst @@ -17,6 +17,10 @@ bans. First, let me explain the HTTP purges. HTTP Purges =========== +A *purge* is what happens when you pick out an object from the cache +and discard it along with its variants. Usually a purge is invoked +through HTTP with the method PURGE. + An HTTP purge is similar to an HTTP GET request, except that the *method* is PURGE. Actually you can call the method whatever you'd like, but most people refer to this as purging. Squid supports the From perbu at varnish-cache.org Thu Jun 30 08:23:39 2011 From: perbu at varnish-cache.org (Per Buer) Date: Thu, 30 Jun 2011 10:23:39 +0200 Subject: [master] e1f1d8f do_stream Message-ID: commit e1f1d8f157eda6545b93161792f095615228a35d Author: Per Buer Date: Thu Jun 30 10:23:25 2011 +0200 do_stream diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 4a88dd1..8ed308d 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -647,6 +647,12 @@ The following variables are available after the requested object has been retrieved from the backend, before it is entered into the cache. In other words, they are available in vcl_fetch: +beresp.do_stream + Deliver the object to the client directly without fetching the whole + object into varnish. If this request is pass'ed it will not be + stored in memory. As of Varnish Cache 3.0 the object will marked as busy + as it is delivered so only client can access the object. + beresp.do_esi Boolean. ESI-process the object after fetching it. Defaults to false. Set it to true to parse the object for ESI directives. From perbu at varnish-cache.org Thu Jun 30 08:23:39 2011 From: perbu at varnish-cache.org (Per Buer) Date: Thu, 30 Jun 2011 10:23:39 +0200 Subject: [master] 41aa97b Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 41aa97bf87080af20b3976a6e2718c1307f18e62 Merge: e1f1d8f 91023bb Author: Per Buer Date: Thu Jun 30 10:23:30 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Thu Jun 30 08:32:32 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Thu, 30 Jun 2011 10:32:32 +0200 Subject: [master] 01d9c22 Fix a compiler fault if two IP comparisons were on the same line of source code. Message-ID: commit 01d9c22319c04940aff6743a9ca9e9a474cd194c Author: Poul-Henning Kamp Date: Thu Jun 30 08:30:40 2011 +0000 Fix a compiler fault if two IP comparisons were on the same line of source code. This is substantially DocWilcos fix, but instead of adding yet another unique numbering variable, I have collapsed the once we have into a single one. Fixes #948 diff --git a/bin/varnishtest/tests/r00948.vtc b/bin/varnishtest/tests/r00948.vtc new file mode 100644 index 0000000..559cbbc --- /dev/null +++ b/bin/varnishtest/tests/r00948.vtc @@ -0,0 +1,30 @@ +varnishtest "anon acl numbering" + + +server s1 { + rxreq + expect req.http.foo1 == "Match" + expect req.http.foo2 == "Match" + txresp -bodylen 40 +} -start + +varnish v1 -vcl+backend { + +sub vcl_recv { + if (client.ip == "${s1_addr}" || client.ip == "${bad_ip}") { + set req.http.foo1 = "Match"; + } + if (client.ip == "${bad_ip}" || client.ip == "${s1_addr}") { + set req.http.foo2 = "Match"; + } +} + +} -start + +client c1 { + txreq + rxresp + expect resp.bodylen == 40 +} -run + + diff --git a/lib/libvcl/vcc_acl.c b/lib/libvcl/vcc_acl.c index c506c78..30c9eea 100644 --- a/lib/libvcl/vcc_acl.c +++ b/lib/libvcl/vcc_acl.c @@ -454,7 +454,7 @@ vcc_Acl_Hack(struct vcc *tl, char *b) VTAILQ_INIT(&tl->acl); tcond = tl->t->tok; vcc_NextToken(tl); - bprintf(acln, "%u", tl->cnt); + bprintf(acln, "%u", tl->unique++); vcc_acl_entry(tl); vcc_acl_emit(tl, acln, 1); sprintf(b, "%smatch_acl_anon_%s(sp, \v1)", diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index f90c1b1..babfe01 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -83,7 +83,7 @@ emit_sockaddr(struct vcc *tl, void *sa, unsigned sal) AN(sal); assert(sal < 256); Fh(tl, 0, "\nstatic const unsigned char sockaddr%u[%d] = {\n", - tl->nsockaddr, sal + 1); + tl->unique, sal + 1); Fh(tl, 0, " %3u, /* Length */\n", sal); u = sa; for (len = 0; len nsockaddr++); + return (tl->unique++); } /*-------------------------------------------------------------------- diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h index b8c8454..ec7caed 100644 --- a/lib/libvcl/vcc_compile.h +++ b/lib/libvcl/vcc_compile.h @@ -162,8 +162,7 @@ struct vcc { struct token *t_dir; struct token *t_policy; - unsigned recnt; - unsigned nsockaddr; + unsigned unique; unsigned nvmodpriv; unsigned err_unref; diff --git a/lib/libvcl/vcc_string.c b/lib/libvcl/vcc_string.c index 06e7277..ed91c35 100644 --- a/lib/libvcl/vcc_string.c +++ b/lib/libvcl/vcc_string.c @@ -63,7 +63,7 @@ vcc_regexp(struct vcc *tl) return (NULL); } VRE_free(&t); - sprintf(buf, "VGC_re_%u", tl->recnt++); + sprintf(buf, "VGC_re_%u", tl->unique++); p = TlAlloc(tl, strlen(buf) + 1); strcpy(p, buf); From phk at varnish-cache.org Thu Jun 30 08:32:40 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Thu, 30 Jun 2011 10:32:40 +0200 Subject: [master] b998711 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit b998711ca9b2565dc959d4652993951e3a7145b6 Merge: 01d9c22 41aa97b Author: Poul-Henning Kamp Date: Thu Jun 30 08:32:15 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From martin at varnish-cache.org Thu Jun 30 09:11:13 2011 From: martin at varnish-cache.org (Martin Blix Grydeland) Date: Thu, 30 Jun 2011 11:11:13 +0200 Subject: [master] 90b7074 Reintroduce TTL VCL logging that was lost in commit a21746d23d4047ce209a0c283e12ff684f478b72. Message-ID: commit 90b7074b4cad090743f5a9797007ab448fa95a39 Author: Martin Blix Grydeland Date: Tue Jun 28 15:47:26 2011 +0200 Reintroduce TTL VCL logging that was lost in commit a21746d23d4047ce209a0c283e12ff684f478b72. Fixes: #941 diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c index 5f3ecb5..297151c 100644 --- a/bin/varnishd/cache_vrt_var.c +++ b/bin/varnishd/cache_vrt_var.c @@ -385,10 +385,13 @@ VRT_DO_EXP(req, sp->exp, ttl, ) VRT_DO_EXP(req, sp->exp, grace, ) VRT_DO_EXP(req, sp->exp, keep, ) VRT_DO_EXP(obj, sp->obj->exp, grace, EXP_Rearm(sp->obj)) -VRT_DO_EXP(obj, sp->obj->exp, ttl, EXP_Rearm(sp->obj)) +VRT_DO_EXP(obj, sp->obj->exp, ttl, + EXP_Rearm(sp->obj); + WSP(sp, SLT_TTL, "%u VCL %.0f %.0f", sp->obj->xid, a, sp->t_req)) VRT_DO_EXP(obj, sp->obj->exp, keep, EXP_Rearm(sp->obj)) VRT_DO_EXP(beresp, sp->wrk->exp, grace, ) -VRT_DO_EXP(beresp, sp->wrk->exp, ttl, ) +VRT_DO_EXP(beresp, sp->wrk->exp, ttl, + WSP(sp, SLT_TTL, "%u VCL %.0f %.0f", sp->xid, a, sp->t_req)) VRT_DO_EXP(beresp, sp->wrk->exp, keep, ) /*-------------------------------------------------------------------- diff --git a/bin/varnishtest/tests/r00941.vtc b/bin/varnishtest/tests/r00941.vtc new file mode 100644 index 0000000..1028e2d --- /dev/null +++ b/bin/varnishtest/tests/r00941.vtc @@ -0,0 +1,24 @@ +varnishtest "beresp.ttl set in vcl takes effect" + +server s1 { + rxreq + txresp -hdr "Cache-control: max-age=1" -body "FOO" + rxreq + txresp -body "FOOBAR" +} -start + +varnish v1 -vcl+backend { + sub vcl_fetch { + set beresp.ttl = 1000s; + } +} -start + +client c1 { + txreq + rxresp + expect resp.bodylen == 3 + delay 2 + txreq + rxresp + expect resp.bodylen == 3 +} -run From phk at varnish-cache.org Thu Jun 30 11:07:40 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Thu, 30 Jun 2011 13:07:40 +0200 Subject: [master] 7209a66 Split registration and selection of backend poll functions into two different functions. Message-ID: commit 7209a66e764e7afd9d8ca179494b1656f0ec0c9b Author: Poul-Henning Kamp Date: Thu Jun 30 11:06:51 2011 +0000 Split registration and selection of backend poll functions into two different functions. I have not managed to write a vtc case for this one, but I am pretty sure this: Fixes: #945 diff --git a/bin/varnishd/cache_backend.c b/bin/varnishd/cache_backend.c index 8c13112..3d6a405 100644 --- a/bin/varnishd/cache_backend.c +++ b/bin/varnishd/cache_backend.c @@ -430,7 +430,7 @@ VBE_UseHealth(const struct director *vdi) CAST_OBJ_NOTNULL(vs, vdi->priv, VDI_SIMPLE_MAGIC); if (vs->vrt->probe == NULL) return; - VBP_Start(vs->backend, vs->vrt->probe, vs->vrt->hosthdr); + VBP_Use(vs->backend, vs->vrt->probe); } /*-------------------------------------------------------------------- @@ -475,7 +475,8 @@ vdi_simple_fini(const struct director *d) CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC); CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC); - VBP_Stop(vs->backend, vs->vrt->probe); + if (vs->vrt->probe != NULL) + VBP_Remove(vs->backend, vs->vrt->probe); VBE_DropRefVcl(vs->backend); free(vs->dir.vcl_name); vs->dir.magic = 0; @@ -506,8 +507,8 @@ VRT_init_dir_simple(struct cli *cli, struct director **bp, int idx, vs->vrt = t; vs->backend = VBE_AddBackend(cli, t); - if (vs->backend->probe == NULL) - VBP_Start(vs->backend, vs->vrt->probe, vs->vrt->hosthdr); + if (vs->vrt->probe != NULL) + VBP_Insert(vs->backend, vs->vrt->probe, vs->vrt->hosthdr); bp[idx] = &vs->dir; } diff --git a/bin/varnishd/cache_backend.h b/bin/varnishd/cache_backend.h index cb707ba..c065218 100644 --- a/bin/varnishd/cache_backend.h +++ b/bin/varnishd/cache_backend.h @@ -145,8 +145,9 @@ void VBE_DropRefVcl(struct backend *); void VBE_DropRefLocked(struct backend *b); /* cache_backend_poll.c */ -void VBP_Start(struct backend *b, struct vrt_backend_probe const *p, const char *hosthdr); -void VBP_Stop(struct backend *b, struct vrt_backend_probe const *p); +void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p, const char *hosthdr); +void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p); +void VBP_Use(struct backend *b, const struct vrt_backend_probe const *p); /* Init functions for directors */ typedef void dir_init_f(struct cli *, struct director **, int , const void*); diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c index d1acf2a..d7b5268 100644 --- a/bin/varnishd/cache_backend_poll.c +++ b/bin/varnishd/cache_backend_poll.c @@ -463,11 +463,11 @@ vbp_new_vcl(const struct vrt_backend_probe *p, const char *hosthdr) } /*-------------------------------------------------------------------- - * Start/Stop called from cache_backend.c + * Insert/Remove/Use called from cache_backend.c */ void -VBP_Start(struct backend *b, const struct vrt_backend_probe *p, const char *hosthdr) +VBP_Insert(struct backend *b, const struct vrt_backend_probe *p, const char *hosthdr) { struct vbp_target *vt; struct vbp_vcl *vcl; @@ -475,9 +475,7 @@ VBP_Start(struct backend *b, const struct vrt_backend_probe *p, const char *host unsigned u; ASSERT_CLI(); - - if (p == NULL) - return; + AN(p); if (b->probe == NULL) { ALLOC_OBJ(vt, VBP_TARGET_MAGIC); @@ -493,21 +491,12 @@ VBP_Start(struct backend *b, const struct vrt_backend_probe *p, const char *host vt = b->probe; } - VTAILQ_FOREACH(vcl, &vt->vcls, list) { - if (vcl->probep != p) - continue; - - AZ(startthread); - Lck_Lock(&vbp_mtx); - VTAILQ_REMOVE(&vt->vcls, vcl, list); - VTAILQ_INSERT_HEAD(&vt->vcls, vcl, list); - Lck_Unlock(&vbp_mtx); - return; - } + VTAILQ_FOREACH(vcl, &vt->vcls, list) + assert (vcl->probep != p); vcl = vbp_new_vcl(p, hosthdr); Lck_Lock(&vbp_mtx); - VTAILQ_INSERT_HEAD(&vt->vcls, vcl, list); + VTAILQ_INSERT_TAIL(&vt->vcls, vcl, list); Lck_Unlock(&vbp_mtx); if (startthread) { @@ -521,21 +510,42 @@ VBP_Start(struct backend *b, const struct vrt_backend_probe *p, const char *host } void -VBP_Stop(struct backend *b, struct vrt_backend_probe const *p) +VBP_Use(struct backend *b, const struct vrt_backend_probe *p) { struct vbp_target *vt; struct vbp_vcl *vcl; - void *ret; ASSERT_CLI(); + AN(p); + CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC); + AN(b->probe); + vt = b->probe; - if (p == NULL) + VTAILQ_FOREACH(vcl, &vt->vcls, list) { + if (vcl->probep != p) + continue; + + Lck_Lock(&vbp_mtx); + VTAILQ_REMOVE(&vt->vcls, vcl, list); + VTAILQ_INSERT_HEAD(&vt->vcls, vcl, list); + Lck_Unlock(&vbp_mtx); return; + } +} - CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC); +void +VBP_Remove(struct backend *b, struct vrt_backend_probe const *p) +{ + struct vbp_target *vt; + struct vbp_vcl *vcl; + void *ret; + ASSERT_CLI(); + AN(p); + CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC); AN(b->probe); vt = b->probe; + VTAILQ_FOREACH(vcl, &vt->vcls, list) if (vcl->probep == p) break;