Excercise tests on actual STRANDS

parent d1e342a8
......@@ -17,11 +17,11 @@ varnish v1 -vcl {
sub do_eurutf {
if (req.http.fallback != "") {
set resp.http.out = eurutf.iconv(
set resp.http.out = eurutf.iconv("X" +
blob.transcode(BASE64, encoded=req.http.in),
fallback=req.http.fallback);
} else {
set resp.http.out = eurutf.iconv(
set resp.http.out = eurutf.iconv("X" +
blob.transcode(BASE64, encoded=req.http.in));
}
return (deliver);
......@@ -29,11 +29,11 @@ varnish v1 -vcl {
sub do_utfeur {
if (req.http.fallback != "") {
set resp.http.out = blob.transcode(encoding=URL,
encoded=utfeur.iconv(req.http.in,
encoded=utfeur.iconv("x" + req.http.in + "x",
fallback=req.http.fallback));
} else {
set resp.http.out = blob.transcode(encoding=URL,
encoded=utfeur.iconv(req.http.in));
encoded=utfeur.iconv("x" + req.http.in + "x"));
}
return (deliver);
}
......@@ -51,11 +51,11 @@ client c1 {
txreq -url "/eurutf" -hdr "in: pA=="
rxresp
expect resp.status == 200
expect resp.http.out == "€"
expect resp.http.out == "X€"
txreq -url "/utfeur" -hdr "in: €"
rxresp
expect resp.http.out == "%a4"
expect resp.http.out == "x%a4x"
expect resp.status == 200
txreq -url "/utfeur" -hdr "fallback: bad" -hdr "in: 🐰"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment