Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
b6ec427f
Commit
b6ec427f
authored
Feb 17, 2011
by
Per Buer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
4600acfb
089a3352
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
55 deletions
+33
-55
cache_backend.c
bin/varnishd/cache_backend.c
+5
-31
cache_esi_deliver.c
bin/varnishd/cache_esi_deliver.c
+4
-1
cache_esi_fetch.c
bin/varnishd/cache_esi_fetch.c
+2
-2
cache_vrt_vmod.c
bin/varnishd/cache_vrt_vmod.c
+1
-1
heritage.h
bin/varnishd/heritage.h
+1
-4
mgt_param.c
bin/varnishd/mgt_param.c
+14
-12
vparam.h
bin/varnishd/vparam.h
+5
-4
c00034.vtc
bin/varnishtest/tests/c00034.vtc
+1
-0
No files found.
bin/varnishd/cache_backend.c
View file @
b6ec427f
...
...
@@ -62,12 +62,6 @@ struct vdi_simple {
const
struct
vrt_backend
*
vrt
;
};
/*
* List of cached vbcs, used if enabled in params/heritage
*/
static
VTAILQ_HEAD
(,
vbc
)
vbcs
=
VTAILQ_HEAD_INITIALIZER
(
vbcs
);
/*--------------------------------------------------------------------
* Create default Host: header for backend request
*/
...
...
@@ -97,17 +91,10 @@ VBE_ReleaseConn(struct vbc *vc)
vc
->
addr
=
NULL
;
vc
->
addrlen
=
0
;
vc
->
recycled
=
0
;
if
(
params
->
cache_vbcs
)
{
Lck_Lock
(
&
VBE_mtx
);
VTAILQ_INSERT_HEAD
(
&
vbcs
,
vc
,
list
);
VSC_main
->
backend_unused
++
;
Lck_Unlock
(
&
VBE_mtx
);
}
else
{
Lck_Lock
(
&
VBE_mtx
);
VSC_main
->
n_vbc
--
;
Lck_Unlock
(
&
VBE_mtx
);
free
(
vc
);
}
Lck_Lock
(
&
VBE_mtx
);
VSC_main
->
n_vbc
--
;
Lck_Unlock
(
&
VBE_mtx
);
FREE_OBJ
(
vc
);
}
#define FIND_TMO(tmx, dst, sp, be) \
...
...
@@ -238,21 +225,8 @@ vbe_NewConn(void)
{
struct
vbc
*
vc
;
vc
=
VTAILQ_FIRST
(
&
vbcs
);
if
(
vc
!=
NULL
)
{
Lck_Lock
(
&
VBE_mtx
);
vc
=
VTAILQ_FIRST
(
&
vbcs
);
if
(
vc
!=
NULL
)
{
VSC_main
->
backend_unused
--
;
VTAILQ_REMOVE
(
&
vbcs
,
vc
,
list
);
}
Lck_Unlock
(
&
VBE_mtx
);
}
if
(
vc
!=
NULL
)
return
(
vc
);
vc
=
calloc
(
sizeof
*
vc
,
1
);
ALLOC_OBJ
(
vc
,
VBC_MAGIC
);
XXXAN
(
vc
);
vc
->
magic
=
VBC_MAGIC
;
vc
->
fd
=
-
1
;
Lck_Lock
(
&
VBE_mtx
);
VSC_main
->
n_vbc
++
;
...
...
bin/varnishd/cache_esi_deliver.c
View file @
b6ec427f
...
...
@@ -55,6 +55,10 @@ ved_include(struct sess *sp, const char *src, const char *host)
w
=
sp
->
wrk
;
if
(
sp
->
esi_level
>=
params
->
max_esi_depth
)
return
;
sp
->
esi_level
++
;
if
(
WRW_Flush
(
w
))
{
vca_close_session
(
sp
,
"remote closed"
);
return
;
...
...
@@ -62,7 +66,6 @@ ved_include(struct sess *sp, const char *src, const char *host)
AZ
(
WRW_FlushRelease
(
w
));
sp
->
esi_level
++
;
obj
=
sp
->
obj
;
sp
->
obj
=
NULL
;
res_mode
=
sp
->
wrk
->
res_mode
;
...
...
bin/varnishd/cache_esi_fetch.c
View file @
b6ec427f
...
...
@@ -310,8 +310,8 @@ vfp_esi_begin(struct sess *sp, size_t estimate)
VEP_Init
(
sp
,
NULL
);
}
else
if
(
sp
->
wrk
->
is_gunzip
&&
sp
->
wrk
->
do_gzip
)
{
ALLOC_OBJ
(
vef
,
VEF_MAGIC
);
AN
(
vef
);
//vef = (void*)WS_Alloc(sp->ws, sizeof *vef);
//AN(vef);
//memset(vef, 0, sizeof *vef);
//vef->magic = VEF_MAGIC;
vef
->
vgz
=
VGZ_NewGzip
(
sp
,
"G F E"
);
...
...
@@ -321,8 +321,8 @@ vfp_esi_begin(struct sess *sp, size_t estimate)
}
else
if
(
sp
->
wrk
->
is_gzip
)
{
sp
->
wrk
->
vgz_rx
=
VGZ_NewUngzip
(
sp
,
"U F E"
);
ALLOC_OBJ
(
vef
,
VEF_MAGIC
);
AN
(
vef
);
//vef = (void*)WS_Alloc(sp->ws, sizeof *vef);
//AN(vef);
//memset(vef, 0, sizeof *vef);
//vef->magic = VEF_MAGIC;
vef
->
vgz
=
VGZ_NewGzip
(
sp
,
"G F E"
);
...
...
bin/varnishd/cache_vrt_vmod.c
View file @
b6ec427f
...
...
@@ -123,7 +123,7 @@ VRT_Vmod_Fini(void **hdl)
if
(
--
v
->
ref
!=
0
)
return
;
#ifndef DONT_DLCLOSE_VMODS
dlclose
(
v
->
hdl
);
AZ
(
dlclose
(
v
->
hdl
)
);
#endif
free
(
v
->
nm
);
free
(
v
->
path
);
...
...
bin/varnishd/heritage.h
View file @
b6ec427f
...
...
@@ -136,7 +136,7 @@ struct params {
unsigned
max_restarts
;
/* Maximum esi:include depth allowed */
unsigned
max_esi_
includes
;
unsigned
max_esi_
depth
;
/* ESI parser hints */
unsigned
esi_syntax
;
...
...
@@ -144,9 +144,6 @@ struct params {
/* Rush exponent */
unsigned
rush_exponent
;
/* Cache vbcs */
unsigned
cache_vbcs
;
/* Default connection_timeout */
double
connect_timeout
;
...
...
bin/varnishd/mgt_param.c
View file @
b6ec427f
...
...
@@ -483,6 +483,10 @@ tweak_diag_bitmap(struct cli *cli, const struct parspec *par, const char *arg)
"this parameter, or if the default value is even sensible. " \
"Caution is advised, and feedback is most welcome."
#define WIZARD_TEXT \
"\nNB: Do not change this parameter, unless a developer tell " \
"you to do so."
/*
* Remember to update varnishd.1 whenever you add / remove a parameter or
* change its default value.
...
...
@@ -647,15 +651,11 @@ static const struct parspec input_parspec[] = {
"Use 0x notation and do the bitor in your head :-)
\n
"
,
0
,
"0"
,
"bitmap"
},
{
"max_esi_
includes
"
,
tweak_uint
,
&
master
.
max_esi_
includes
,
0
,
UINT_MAX
,
{
"max_esi_
depth
"
,
tweak_uint
,
&
master
.
max_esi_
depth
,
0
,
UINT_MAX
,
"Maximum depth of esi:include processing.
\n
"
,
0
,
"5"
,
"includes"
},
{
"cache_vbcs"
,
tweak_bool
,
&
master
.
cache_vbcs
,
0
,
0
,
"Cache vbc's or rely on malloc, that's the question."
,
EXPERIMENTAL
,
"off"
,
"bool"
},
"5"
,
"levels"
},
{
"connect_timeout"
,
tweak_timeout_double
,
&
master
.
connect_timeout
,
0
,
UINT_MAX
,
"Default connection timeout for backend connections. "
...
...
@@ -664,7 +664,7 @@ static const struct parspec input_parspec[] = {
"VCL can override this default value for each backend and "
"backend request."
,
0
,
"0.
4
"
,
"s"
},
"0.
7
"
,
"s"
},
{
"first_byte_timeout"
,
tweak_timeout_double
,
&
master
.
first_byte_timeout
,
0
,
UINT_MAX
,
"Default timeout for receiving first byte from backend. "
...
...
@@ -748,9 +748,9 @@ static const struct parspec input_parspec[] = {
0
,
"8192"
,
"bytes"
},
{
"log_hashstring"
,
tweak_bool
,
&
master
.
log_hash
,
0
,
0
,
"Log the hash string to shared memory log.
\n
"
,
"Log the hash string
components
to shared memory log.
\n
"
,
0
,
"o
ff
"
,
"bool"
},
"o
n
"
,
"bool"
},
{
"log_local_address"
,
tweak_bool
,
&
master
.
log_local_addr
,
0
,
0
,
"Log the local address on the TCP connection in the "
"SessionOpen shared memory record.
\n
"
,
...
...
@@ -812,7 +812,7 @@ static const struct parspec input_parspec[] = {
{
"http_range_support"
,
tweak_bool
,
&
master
.
http_range_support
,
0
,
0
,
"Enable support for HTTP Range headers.
\n
"
,
EXPERIMENTAL
,
"o
ff
"
,
"bool"
},
"o
n
"
,
"bool"
},
{
"http_gzip_support"
,
tweak_bool
,
&
master
.
http_gzip_support
,
0
,
0
,
"Enable gzip support. When enabled Varnish will compress "
"uncompressed objects before they are stored in the cache. "
...
...
@@ -862,7 +862,7 @@ static const struct parspec input_parspec[] = {
&
master
.
critbit_cooloff
,
60
,
254
,
"How long time the critbit hasher keeps deleted objheads "
"on the cooloff list.
\n
"
,
EXPERIMENTAL
,
WIZARD
,
"180.0"
,
"s"
},
{
"vcl_dir"
,
tweak_string
,
&
mgt_vcl_dir
,
0
,
0
,
"Directory from which relative VCL filenames (vcl.load and "
...
...
@@ -958,6 +958,8 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv)
mcf_wrap
(
cli
,
MUST_RELOAD_TEXT
);
if
(
pp
->
flags
&
MUST_RESTART
)
mcf_wrap
(
cli
,
MUST_RESTART_TEXT
);
if
(
pp
->
flags
&
WIZARD
)
mcf_wrap
(
cli
,
WIZARD_TEXT
);
if
(
!
lfmt
)
return
;
else
...
...
bin/varnishd/vparam.h
View file @
b6ec427f
...
...
@@ -41,10 +41,11 @@ struct parspec {
double
max
;
const
char
*
descr
;
int
flags
;
#define DELAYED_EFFECT 1
#define EXPERIMENTAL 2
#define MUST_RESTART 4
#define MUST_RELOAD 8
#define DELAYED_EFFECT (1<<0)
#define EXPERIMENTAL (1<<1)
#define MUST_RESTART (1<<2)
#define MUST_RELOAD (1<<3)
#define WIZARD (1<<4)
const
char
*
def
;
const
char
*
units
;
};
...
...
bin/varnishtest/tests/c00034.vtc
View file @
b6ec427f
...
...
@@ -9,6 +9,7 @@ server s1 {
varnish v1 -vcl+backend {
} -start
varnish v1 -cliok "param.set http_range_support off"
client c1 {
txreq -hdr "Range: bytes=0-9"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment