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
c8a05bf6
Commit
c8a05bf6
authored
Sep 07, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Sep 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add text representation to Fetch_Body VSL message.
parent
0a7a30da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
8 deletions
+57
-8
body_status.h
bin/varnishd/body_status.h
+38
-0
cache.h
bin/varnishd/cache.h
+15
-6
cache_fetch.c
bin/varnishd/cache_fetch.c
+3
-2
flint.lnt
bin/varnishd/flint.lnt
+1
-0
No files found.
bin/varnishd/body_status.h
0 → 100644
View file @
c8a05bf6
/*-
* Copyright (c) 2011 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.
*
* Various ways to handle the body coming from the backend.
*/
/*lint -save -e525 -e539 */
BODYSTATUS
(
NONE
,
none
)
BODYSTATUS
(
ZERO
,
zero
)
BODYSTATUS
(
ERROR
,
error
)
BODYSTATUS
(
CHUNKED
,
chunked
)
BODYSTATUS
(
LENGTH
,
length
)
BODYSTATUS
(
EOF
,
eof
)
/*lint -restore */
bin/varnishd/cache.h
View file @
c8a05bf6
...
...
@@ -66,14 +66,23 @@
#include "vsl.h"
enum
body_status
{
BS_NONE
,
BS_ZERO
,
BS_ERROR
,
BS_CHUNKED
,
BS_LENGTH
,
BS_EOF
#define BODYSTATUS(U,l) BS_##U,
#include "body_status.h"
#undef BODYSTATUS
};
static
inline
const
char
*
body_status
(
enum
body_status
e
)
{
switch
(
e
)
{
#define BODYSTATUS(U,l) case BS_##U: return (#l);
#include "body_status.h"
#undef BODYSTATUS
default:
return
(
"?"
);
}
}
/*
* NB: HDR_STATUS is only used in cache_http.c, everybody else uses the
* http->status integer field.
...
...
bin/varnishd/cache_fetch.c
View file @
c8a05bf6
...
...
@@ -543,8 +543,9 @@ FetchBody(struct sess *sp)
*/
AZ
(
vfp_nop_end
(
sp
));
WSL
(
sp
->
wrk
,
SLT_Fetch_Body
,
sp
->
vbc
->
fd
,
"%u %d %u"
,
sp
->
wrk
->
body_status
,
cls
,
mklen
);
WSL
(
sp
->
wrk
,
SLT_Fetch_Body
,
sp
->
vbc
->
fd
,
"%u(%s) %d %u"
,
sp
->
wrk
->
body_status
,
body_status
(
sp
->
wrk
->
body_status
),
cls
,
mklen
);
if
(
sp
->
wrk
->
body_status
==
BS_ERROR
)
{
VDI_CloseFd
(
sp
);
...
...
bin/varnishd/flint.lnt
View file @
c8a05bf6
...
...
@@ -86,6 +86,7 @@
-efile(451, "sys/\*.h") // No include guard
-efile(451, "machine/\*.h") // No include guard
-efile(451, "vcl_returns.h") // No include guard
-efile(451, "body_status.h") // No include guard
-efile(451, "locks.h") // No include guard
-efile(451, "cache_backend_poll.h") // No include guard
-efile(451, "steps.h") // No include guard
...
...
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