Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
1fbff541
Commit
1fbff541
authored
Jan 03, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
0a96b487
b70a93cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
cache_ban.c
bin/varnishd/cache/cache_ban.c
+9
-3
varnish-cli.rst
doc/sphinx/reference/varnish-cli.rst
+1
-1
ban_vars.h
include/tbl/ban_vars.h
+1
-0
No files found.
bin/varnishd/cache/cache_ban.c
View file @
1fbff541
...
...
@@ -113,9 +113,10 @@ static bgthread_t ban_lurker;
#define BAN_OPER_MATCH 0x12
#define BAN_OPER_NMATCH 0x13
#define BAN_ARG_URL 0x18
#define BAN_ARG_REQHTTP 0x19
#define BAN_ARG_OBJHTTP 0x1a
#define BAN_ARG_URL 0x18
#define BAN_ARG_REQHTTP 0x19
#define BAN_ARG_OBJHTTP 0x1a
#define BAN_ARG_OBJSTATUS 0x1b
/*--------------------------------------------------------------------
* Variables we can purge on
...
...
@@ -609,6 +610,7 @@ ban_evaluate(const uint8_t *bs, const struct http *objhttp,
struct
ban_test
bt
;
const
uint8_t
*
be
;
char
*
arg1
;
char
buf
[
10
];
be
=
bs
+
ban_len
(
bs
);
bs
+=
13
;
...
...
@@ -628,6 +630,10 @@ ban_evaluate(const uint8_t *bs, const struct http *objhttp,
case
BAN_ARG_OBJHTTP
:
(
void
)
http_GetHdr
(
objhttp
,
bt
.
arg1_spec
,
&
arg1
);
break
;
case
BAN_ARG_OBJSTATUS
:
arg1
=
buf
;
sprintf
(
buf
,
"%d"
,
objhttp
->
status
);
break
;
default:
INCOMPL
();
}
...
...
doc/sphinx/reference/varnish-cli.rst
View file @
1fbff541
...
...
@@ -196,7 +196,7 @@ consists of a field, an operator, and an argument. Conditions can be
ANDed together with "&&".
A field can be any of the variables from VCL, for instance req.url,
req.http.host or obj.set-cookie.
req.http.host or obj.
http.
set-cookie.
Operators are "==" for direct comparision, "~" for a regular
expression match, and ">" or "<" for size comparisons. Prepending
...
...
include/tbl/ban_vars.h
View file @
1fbff541
...
...
@@ -35,3 +35,4 @@
PVAR
(
"req.url"
,
PVAR_REQ
,
BAN_ARG_URL
)
PVAR
(
"req.http."
,
PVAR_REQ
|
PVAR_HTTP
,
BAN_ARG_REQHTTP
)
PVAR
(
"obj.http."
,
PVAR_HTTP
,
BAN_ARG_OBJHTTP
)
PVAR
(
"obj.status"
,
0
,
BAN_ARG_OBJSTATUS
)
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