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
2ea02cb4
Commit
2ea02cb4
authored
Jun 24, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Segregate HTTP1 protocol stuff in its own include file.
parent
fec6289e
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
67 additions
and
30 deletions
+67
-30
Makefile.am
bin/varnishd/Makefile.am
+1
-0
cache.h
bin/varnishd/cache/cache.h
+1
-26
cache_backend.c
bin/varnishd/cache/cache_backend.c
+1
-0
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+0
-4
cache_main.c
bin/varnishd/cache/cache_main.c
+1
-0
cache_req_body.c
bin/varnishd/cache/cache_req_body.c
+1
-0
cache_session.c
bin/varnishd/cache/cache_session.c
+1
-0
cache_http1.h
bin/varnishd/http1/cache_http1.h
+54
-0
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+1
-0
cache_http1_fetch.c
bin/varnishd/http1/cache_http1_fetch.c
+1
-0
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+1
-0
cache_http1_line.c
bin/varnishd/http1/cache_http1_line.c
+1
-0
cache_http1_pipe.c
bin/varnishd/http1/cache_http1_pipe.c
+1
-0
cache_http1_proto.c
bin/varnishd/http1/cache_http1_proto.c
+1
-0
cache_http1_vfp.c
bin/varnishd/http1/cache_http1_vfp.c
+1
-0
No files found.
bin/varnishd/Makefile.am
View file @
2ea02cb4
...
...
@@ -103,6 +103,7 @@ noinst_HEADERS = \
cache/cache_pool.h
\
common/heritage.h
\
hash
/hash_slinger.h
\
http1/cache_http1.h
\
mgt/mgt.h
\
mgt/mgt_cli.h
\
mgt/mgt_param.h
\
...
...
bin/varnishd/cache/cache.h
View file @
2ea02cb4
...
...
@@ -707,27 +707,10 @@ ssize_t VBO_waitlen(struct worker *, struct busyobj *, ssize_t l);
void
VBO_setstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
next
);
void
VBO_waitstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
want
);
/* cache_http1_fetch.c [V1F] */
int
V1F_fetch_hdr
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
,
const
char
*
def_host
);
void
V1F_Setup_Fetch
(
struct
vfp_ctx
*
vfc
,
struct
http_conn
*
htc
);
/* cache_http1_fsm.c [HTTP1] */
typedef
int
(
req_body_iter_f
)(
struct
req
*
,
void
*
priv
,
void
*
ptr
,
size_t
);
void
HTTP1_Session
(
struct
worker
*
,
struct
req
*
);
extern
const
int
HTTP1_Req
[
3
];
extern
const
int
HTTP1_Resp
[
3
];
/* cache_http1_deliver.c */
vtr_deliver_f
V1D_Deliver
;
/* cache_http1_pipe.c */
void
V1P_Init
(
void
);
void
V1P_Process
(
struct
req
*
,
struct
busyobj
*
,
int
fd
,
struct
VSC_C_vbe
*
);
/* cache_req_body.c */
int
VRB_Ignore
(
struct
req
*
req
);
ssize_t
VRB_Cache
(
struct
req
*
req
,
ssize_t
maxsize
);
typedef
int
(
req_body_iter_f
)(
struct
req
*
,
void
*
priv
,
void
*
ptr
,
size_t
);
ssize_t
VRB_Iterate
(
struct
req
*
req
,
req_body_iter_f
*
func
,
void
*
priv
);
void
VRB_Free
(
struct
req
*
req
);
...
...
@@ -958,14 +941,6 @@ int Pool_TrySumstat(struct worker *wrk);
void
Pool_PurgeStat
(
unsigned
nobj
);
int
Pool_Task_Any
(
struct
pool_task
*
task
,
enum
task_how
how
);
#define V1L_IsReleased(w) ((w)->v1l == NULL)
void
V1L_Chunked
(
const
struct
worker
*
w
);
void
V1L_EndChunk
(
const
struct
worker
*
w
);
void
V1L_Reserve
(
struct
worker
*
,
struct
ws
*
,
int
*
fd
,
struct
vsl_log
*
,
double
t0
);
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
;
...
...
bin/varnishd/cache/cache_backend.c
View file @
2ea02cb4
...
...
@@ -41,6 +41,7 @@
#include "cache_director.h"
#include "cache_backend.h"
#include "http1/cache_http1.h"
#define FIND_TMO(tmx, dst, bo, be) \
do { \
...
...
bin/varnishd/cache/cache_fetch.c
View file @
2ea02cb4
...
...
@@ -621,9 +621,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
return
(
F_STP_ERROR
);
}
assert
(
V1L_IsReleased
(
wrk
));
if
(
bo
->
do_esi
)
ObjSetFlag
(
bo
->
wrk
,
bo
->
fetch_objcore
,
OF_ESIPROC
,
1
);
...
...
@@ -916,7 +913,6 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
WRONG
(
"Illegal fetch_step"
);
}
}
assert
(
V1L_IsReleased
(
wrk
));
assert
(
bo
->
director_state
==
DIR_S_NULL
);
...
...
bin/varnishd/cache/cache_main.c
View file @
2ea02cb4
...
...
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include "cache.h"
#include "http1/cache_http1.h"
#include "common/heritage.h"
#include "vcli_priv.h"
...
...
bin/varnishd/cache/cache_req_body.c
View file @
2ea02cb4
...
...
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include "cache.h"
#include "http1/cache_http1.h"
#include "cache_filter.h"
#include "vtim.h"
#include "hash/hash_slinger.h"
...
...
bin/varnishd/cache/cache_session.c
View file @
2ea02cb4
...
...
@@ -47,6 +47,7 @@
#include "cache.h"
#include "cache_pool.h"
#include "http1/cache_http1.h"
#include "vsa.h"
#include "vtcp.h"
...
...
bin/varnishd/http1/cache_http1.h
0 → 100644
View file @
2ea02cb4
/*-
* 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.
*
*/
/* cache_http1_fetch.c [V1F] */
int
V1F_fetch_hdr
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
,
const
char
*
def_host
);
void
V1F_Setup_Fetch
(
struct
vfp_ctx
*
vfc
,
struct
http_conn
*
htc
);
/* cache_http1_fsm.c [HTTP1] */
void
HTTP1_Session
(
struct
worker
*
,
struct
req
*
);
extern
const
int
HTTP1_Req
[
3
];
extern
const
int
HTTP1_Resp
[
3
];
/* cache_http1_deliver.c */
vtr_deliver_f
V1D_Deliver
;
/* cache_http1_pipe.c */
void
V1P_Init
(
void
);
void
V1P_Process
(
struct
req
*
,
struct
busyobj
*
,
int
fd
,
struct
VSC_C_vbe
*
);
/* cache_http1_line.c */
void
V1L_Chunked
(
const
struct
worker
*
w
);
void
V1L_EndChunk
(
const
struct
worker
*
w
);
void
V1L_Reserve
(
struct
worker
*
,
struct
ws
*
,
int
*
fd
,
struct
vsl_log
*
,
double
t0
);
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
);
bin/varnishd/http1/cache_http1_deliver.c
View file @
2ea02cb4
...
...
@@ -31,6 +31,7 @@
#include "cache/cache.h"
#include "cache/cache_filter.h"
#include "cache_http1.h"
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/http1/cache_http1_fetch.c
View file @
2ea02cb4
...
...
@@ -44,6 +44,7 @@
#include "cache/cache_director.h"
#include "cache/cache_backend.h"
#include "cache_http1.h"
/*--------------------------------------------------------------------
* Pass the request body to the backend
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
2ea02cb4
...
...
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include "cache/cache.h"
#include "cache_http1.h"
#include "hash/hash_slinger.h"
#include "vtcp.h"
...
...
bin/varnishd/http1/cache_http1_line.c
View file @
2ea02cb4
...
...
@@ -41,6 +41,7 @@
#include <stdio.h>
#include "cache/cache.h"
#include "cache_http1.h"
#include "vtim.h"
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/http1/cache_http1_pipe.c
View file @
2ea02cb4
...
...
@@ -40,6 +40,7 @@
#include "vtcp.h"
#include "vtim.h"
#include "cache_http1.h"
#include "cache/cache_director.h"
#include "cache/cache_backend.h"
...
...
bin/varnishd/http1/cache_http1_proto.c
View file @
2ea02cb4
...
...
@@ -46,6 +46,7 @@
#include "config.h"
#include "cache/cache.h"
#include "cache_http1.h"
#include "vct.h"
...
...
bin/varnishd/http1/cache_http1_vfp.c
View file @
2ea02cb4
...
...
@@ -40,6 +40,7 @@
#include "cache/cache.h"
#include "cache/cache_filter.h"
#include "cache_http1.h"
#include "vct.h"
...
...
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