Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1087f154
Commit
1087f154
authored
Mar 03, 2017
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send PROXY v2 LOCAL header with probes
Fixes #2151
parent
9837045a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
cache_backend_probe.c
bin/varnishd/cache/cache_backend_probe.c
+8
-2
o00004.vtc
bin/varnishtest/tests/o00004.vtc
+2
-2
No files found.
bin/varnishd/cache/cache_backend_probe.c
View file @
1087f154
...
...
@@ -92,6 +92,11 @@ static struct lock vbp_mtx;
static
pthread_cond_t
vbp_cond
;
static
struct
binheap
*
vbp_heap
;
static
unsigned
char
vbp_proxy_local
[]
=
{
0x0d
,
0x0a
,
0x0d
,
0x0a
,
0x00
,
0x0d
,
0x0a
,
0x51
,
0x55
,
0x49
,
0x54
,
0x0a
,
0x20
,
0x00
,
0x00
,
0x00
,
};
/*--------------------------------------------------------------------*/
static
void
...
...
@@ -300,8 +305,9 @@ vbp_poke(struct vbp_target *vt)
if
(
vt
->
backend
->
proxy_header
==
1
)
{
if
(
vbp_write_proxy_v1
(
vt
,
s
)
!=
0
)
return
;
}
else
if
(
vt
->
backend
->
proxy_header
==
2
)
INCOMPL
();
}
else
if
(
vt
->
backend
->
proxy_header
==
2
&&
vbp_write
(
vt
,
s
,
vbp_proxy_local
,
sizeof
vbp_proxy_local
)
!=
0
)
return
;
/* Send the request */
if
(
vbp_write
(
vt
,
s
,
vt
->
req
,
vt
->
req_len
)
!=
0
)
...
...
bin/varnishtest/tests/o00004.vtc
View file @
1087f154
...
...
@@ -21,7 +21,7 @@ varnish v1 -proto PROXY -vcl+backend {
varnish v2 -proto PROXY -vcl {
import std;
probe
p
{
probe
default
{
.window = 1;
.threshold = 1;
.interval =0.5s;
...
...
@@ -30,7 +30,6 @@ varnish v2 -proto PROXY -vcl {
.host = "${v1_addr}";
.port = "${v1_port}";
.proxy_header = 1;
.probe = p;
}
backend bp2 {
.host = "${v1_addr}";
...
...
@@ -48,3 +47,4 @@ server s1 -wait
delay 1
varnish v2 -cliexpect "vcl1.bp1[ ]+probe[ ]+Healthy[ ]+1/1" backend.list
varnish v2 -cliexpect "vcl1.bp2[ ]+probe[ ]+Healthy[ ]+1/1" backend.list
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