Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
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
libvmod-re
Commits
aba2e566
Unverified
Commit
aba2e566
authored
May 28, 2023
by
Nils Goroll
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix .match_body() for cached bereq.body
parent
446a5900
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
c09.vtc
src/tests/c09.vtc
+6
-2
vmod_re.c
src/vmod_re.c
+6
-1
No files found.
src/tests/c09.vtc
View file @
aba2e566
...
...
@@ -43,12 +43,16 @@ varnish v1 -vcl {
# 1d670e2f04a4ff13615c7e6a4ee800e4ba8ebaf2
sub vcl_recv {
# adjust if number of reqs in c1 changes
if (std.integer(req.xid) > 1009) {
if (std.integer(req.xid) >= 1020) {
std.cache_req_body(1KB);
}
# adjust if number of reqs in c1 changes
if (std.integer(req.xid) >= 1011) {
return (pass);
}
# adjust if number of reqs in c1 changes
if (std.integer(req.xid) >
1005
) {
if (std.integer(req.xid) >
= 1006
) {
std.cache_req_body(1KB);
}
if (pattern.match_body(req_body)) {
...
...
src/vmod_re.c
View file @
aba2e566
/*-
* Copyright 2013 - 20
18
UPLEX Nils Goroll Systemoptimierung
* Copyright 2013 - 20
23
UPLEX Nils Goroll Systemoptimierung
* All rights reserved
*
* Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
...
...
@@ -556,6 +556,11 @@ vmod_regex_match_body(VRT_CTX, struct vmod_re_regex *re, VCL_ENUM which,
(
void
)
VRB_Iterate
(
ctx
->
req
->
wrk
,
ctx
->
vsl
,
ctx
->
req
,
match_iter_f
,
reip
);
}
else
if
(
which
==
VENUM
(
bereq_body
)
&&
ctx
->
bo
!=
NULL
&&
ctx
->
bo
->
bereq_body
!=
NULL
)
{
(
void
)
ObjIterate
(
ctx
->
bo
->
wrk
,
ctx
->
bo
->
bereq_body
,
reip
,
match_iter_f
,
0
);
}
else
if
(
which
==
VENUM
(
bereq_body
))
{
if
(
ctx
->
bo
==
NULL
||
ctx
->
bo
->
req
==
NULL
)
errmsg
(
ctx
,
"vmod re: .match_body(which = bereq_body) "
...
...
Geoff Simmons
@geoff
mentioned in merge request
!3 (merged)
·
Jun 01, 2023
mentioned in merge request
!3 (merged)
mentioned in merge request !3
Toggle commit list
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