Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
Commits
85594125
Commit
85594125
authored
Mar 07, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the body_status enum to cache.h
parent
c7991588
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
54 deletions
+15
-54
cache.h
bin/varnishd/cache.h
+9
-1
cache_fetch.c
bin/varnishd/cache_fetch.c
+5
-10
Makefile.am
include/Makefile.am
+1
-2
vtypes.h
include/vtypes.h
+0
-41
No files found.
bin/varnishd/cache.h
View file @
85594125
...
...
@@ -65,7 +65,15 @@
#include "vsc.h"
#include "vsl.h"
#include "vtypes.h"
enum
body_status
{
BS_NONE
,
BS_ZERO
,
BS_ERROR
,
BS_CHUNKED
,
BS_LENGTH
,
BS_EOF
};
/*
* NB: HDR_STATUS is only used in cache_http.c, everybody else uses the
...
...
bin/varnishd/cache_fetch.c
View file @
85594125
...
...
@@ -499,11 +499,6 @@ FetchBody(struct sess *sp)
AN
(
sp
->
director
);
AssertObjPassOrBusy
(
sp
->
obj
);
/*
* Determine if we have a body or not
* XXX: Missing: RFC2616 sec. 4.4 in re 1xx, 204 & 304 responses
*/
AZ
(
sp
->
wrk
->
vgz_rx
);
AZ
(
VTAILQ_FIRST
(
&
sp
->
obj
->
store
));
switch
(
sp
->
wrk
->
body_status
)
{
...
...
@@ -542,9 +537,9 @@ FetchBody(struct sess *sp)
/*
* It is OK for ->end to just leave the last storage segment
* sitting on sp->wrk->storage, we will always call vfp_nop_end()
* to get it trimmed
and added to the object
.
* to get it trimmed
or thrown out if empty
.
*/
XXX
AZ
(
vfp_nop_end
(
sp
));
AZ
(
vfp_nop_end
(
sp
));
WSL
(
sp
->
wrk
,
SLT_Fetch_Body
,
sp
->
vbc
->
fd
,
"%u %d %u"
,
sp
->
wrk
->
body_status
,
cls
,
mklen
);
...
...
@@ -554,9 +549,6 @@ FetchBody(struct sess *sp)
return
(
__LINE__
);
}
if
(
cls
==
0
&&
sp
->
wrk
->
do_close
)
cls
=
1
;
if
(
cls
<
0
)
{
sp
->
wrk
->
stats
.
fetch_failed
++
;
/* XXX: Wouldn't this store automatically be released ? */
...
...
@@ -570,6 +562,9 @@ FetchBody(struct sess *sp)
return
(
__LINE__
);
}
if
(
cls
==
0
&&
sp
->
wrk
->
do_close
)
cls
=
1
;
WSL
(
sp
->
wrk
,
SLT_Length
,
sp
->
vbc
->
fd
,
"%u"
,
sp
->
obj
->
len
);
{
...
...
include/Makefile.am
View file @
85594125
...
...
@@ -50,8 +50,7 @@ nobase_noinst_HEADERS = \
vrt.h
\
vrt_obj.h
\
vrt_stv_var.h
\
vss.h
\
vtypes.h
vss.h
vrt_stv_var.h vcl_returns.h vcl.h vrt_obj.h
:
$(top_srcdir)/lib/libvcl/generate.py $(top_srcdir)/include/vrt.h
@
PYTHON@
$(top_srcdir)
/lib/libvcl/generate.py
$(top_srcdir)
$(top_builddir)
...
...
include/vtypes.h
deleted
100644 → 0
View file @
c7991588
/*-
* Copyright (c) 2010 Linpro 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.
*
* $Id$
*
* Very special types, widely used, in their own #include to keep
* #include-infection minimal.
*/
enum
body_status
{
BS_NONE
,
BS_ZERO
,
BS_ERROR
,
BS_CHUNKED
,
BS_LENGTH
,
BS_EOF
};
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