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
4172f988
Commit
4172f988
authored
Jul 18, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug in the entity-replacement code in the ESI-parser.
Patch by: scoof Fixes #961
parent
0c5337e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
cache_esi_parse.c
bin/varnishd/cache_esi_parse.c
+1
-1
r00961.vtc
bin/varnishtest/tests/r00961.vtc
+49
-0
No files found.
bin/varnishd/cache_esi_parse.c
View file @
4172f988
...
...
@@ -518,7 +518,7 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
#define R(w,f,r) \
if (q + w <= p + l && !memcmp(q, f, w)) { \
VSB_printf(vep->vsb, "%c", r); \
q +=
l
; \
q +=
w
; \
continue; \
}
R
(
6
,
"'"
,
'\''
);
...
...
bin/varnishtest/tests/r00961.vtc
0 → 100644
View file @
4172f988
varnishtest "Test XML 1.0 entity references"
server s1 {
rxreq
expect req.url == "/"
txresp -body {
<esi:include src="t&t"/>
<esi:include src="t<t"/>
<esi:include src="t>t"/>
<esi:include src="t't"/>
<esi:include src="t"t"/>
}
rxreq
expect req.url == "/t&t"
txresp -body "1"
rxreq
expect req.url == "/t<t"
txresp -body "22"
rxreq
expect req.url == "/t>t"
txresp -body "333"
rxreq
expect req.url == {/t't}
txresp -body "4444"
rxreq
expect req.url == {/t"t}
txresp -body "55555"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
return (pass);
}
sub vcl_fetch {
set beresp.do_esi = true;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.bodylen == 32
} -run
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