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
1dbd3c74
Commit
1dbd3c74
authored
Mar 23, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Insert an empty place-holder for the PROXY protocol.
parent
32ad2869
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
3 deletions
+58
-3
Makefile.am
bin/varnishd/Makefile.am
+1
-0
cache.h
bin/varnishd/cache/cache.h
+4
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+3
-0
flint.sh
bin/varnishd/flint.sh
+3
-2
mgt_acceptor.c
bin/varnishd/mgt/mgt_acceptor.c
+3
-0
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+41
-0
steps.h
include/tbl/steps.h
+3
-0
No files found.
bin/varnishd/Makefile.am
View file @
1dbd3c74
...
...
@@ -78,6 +78,7 @@ varnishd_SOURCES = \
mgt/mgt_shmem.c
\
mgt/mgt_vcc.c
\
mgt/mgt_vcl.c
\
proxy/cache_proxy_proto.c
\
storage/stevedore.c
\
storage/stevedore_mgt.c
\
storage/stevedore_utils.c
\
...
...
bin/varnishd/cache/cache.h
View file @
1dbd3c74
...
...
@@ -977,6 +977,9 @@ unsigned V1L_Flush(const struct worker *w);
unsigned
V1L_FlushRelease
(
struct
worker
*
w
);
size_t
V1L_Write
(
const
struct
worker
*
w
,
const
void
*
ptr
,
ssize_t
len
);
/* cache_proxy.c [VPX] */
task_func_t
VPX_Proto_Sess
;
/* cache_range.c [VRG] */
void
VRG_dorange
(
struct
req
*
req
,
struct
busyobj
*
bo
,
const
char
*
r
);
...
...
@@ -990,7 +993,7 @@ void SES_DeletePool(struct sesspool *sp);
int
SES_Reschedule_Req
(
struct
req
*
);
struct
req
*
SES_GetReq
(
const
struct
worker
*
,
struct
sess
*
);
void
SES_ReleaseReq
(
struct
req
*
);
void
SES_Proto_Sess
(
struct
worker
*
wrk
,
void
*
arg
)
;
task_func_t
SES_Proto_Sess
;
#define SESS_ATTR(UP, low, typ, len) \
int SES_Get_##low(const struct sess *sp, typ *dst); \
...
...
bin/varnishd/cache/cache_session.c
View file @
1dbd3c74
...
...
@@ -240,6 +240,9 @@ SES_Proto_Sess(struct worker *wrk, void *arg)
sp
->
sess_step
=
S_STP_H1NEWREQ
;
wrk
->
task
.
func
=
ses_proto_req
;
wrk
->
task
.
priv
=
req
;
}
else
if
(
sp
->
sess_step
<
S_STP_PROXY_LAST
)
{
wrk
->
task
.
func
=
VPX_Proto_Sess
;
wrk
->
task
.
priv
=
sp
;
}
else
{
WRONG
(
"Wrong session step"
);
}
...
...
bin/varnishd/flint.sh
View file @
1dbd3c74
...
...
@@ -20,11 +20,12 @@ flexelint \
-DVARNISH_VCL_DIR
=
\"
foo
\"
\
cache/
*
.c
\
common/
*
.c
\
storage/
*
.c
\
waiter/
*
.c
\
hash
/
*
.c
\
http1/
*
.c
\
mgt/
*
.c
\
proxy/
*
.c
\
storage/
*
.c
\
waiter/
*
.c
\
../../lib/libvarnish/
*
.c
\
../../lib/libvarnishcompat/execinfo.c
\
../../lib/libvcc/
*
.c
\
...
...
bin/varnishd/mgt/mgt_acceptor.c
View file @
1dbd3c74
...
...
@@ -183,6 +183,9 @@ MAC_Arg(const char *arg)
if
(
av
[
2
]
==
NULL
||
!
strcmp
(
av
[
2
],
"HTTP/1"
))
{
mh
->
first_step
=
S_STP_H1NEWSESS
;
mh
->
proto_name
=
"HTTP/1"
;
}
else
if
(
!
strcmp
(
av
[
2
],
"PROXY"
))
{
mh
->
first_step
=
S_STP_PROXYNEWSESS
;
mh
->
proto_name
=
"PROXY"
;
}
else
{
ARGV_ERR
(
"Unknown protocol '%s'
\n
"
,
av
[
2
]);
}
...
...
bin/varnishd/proxy/cache_proxy_proto.c
0 → 100644
View file @
1dbd3c74
/*-
* Copyright (c) 2015 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* 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.
*
*/
#include "config.h"
#include "../cache/cache.h"
void
__match_proto__
(
task_func_t
)
VPX_Proto_Sess
(
struct
worker
*
wrk
,
void
*
priv
)
{
(
void
)
wrk
;
(
void
)
priv
;
INCOMPL
();
}
include/tbl/steps.h
View file @
1dbd3c74
...
...
@@ -35,6 +35,9 @@ SESS_STEP(h1newsess, H1NEWSESS)
SESS_STEP
(
h1newreq
,
H1NEWREQ
)
SESS_STEP
(
h1working
,
H1WORKING
)
SESS_STEP
(
h1_last
,
H1_LAST
)
SESS_STEP
(
proxynewsess
,
PROXYNEWSESS
)
SESS_STEP
(
proxy_last
,
PROXY_LAST
)
#endif
#ifdef REQ_STEP
...
...
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