[5.2] 8bfe521 Whitespace OCD
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Fri Sep 15 11:17:21 UTC 2017
commit 8bfe521cd52e60d6dad2082f2462a096a49acac6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Sep 13 09:21:36 2017 +0000
Whitespace OCD
diff --git a/bin/varnishtest/tests/m00033.vtc b/bin/varnishtest/tests/m00033.vtc
index 81b654d..e4d963c 100644
--- a/bin/varnishtest/tests/m00033.vtc
+++ b/bin/varnishtest/tests/m00033.vtc
@@ -52,15 +52,15 @@ varnish v1 -vcl {
set resp.http.truncated =
blob.encode(IDENTITY,
- blob=blob.decode(HEX, encoded="666f6f00626172"));
+ blob=blob.decode(HEX, encoded="666f6f00626172"));
set resp.http.lc =
blob.encode(IDENTITY, LOWER, blob.decode(IDENTITY,
- encoded="Don't care"));
+ encoded="Don't care"));
set resp.http.uc =
blob.encode(IDENTITY, UPPER, blob.decode(IDENTITY,
- encoded="Don't care"));
+ encoded="Don't care"));
}
} -start
diff --git a/bin/varnishtest/tests/m00034.vtc b/bin/varnishtest/tests/m00034.vtc
index 95ea934..9d7144e 100644
--- a/bin/varnishtest/tests/m00034.vtc
+++ b/bin/varnishtest/tests/m00034.vtc
@@ -15,7 +15,7 @@ varnish v1 -vcl {
set resp.http.hobbes =
blob.encode(IDENTITY, blob=blob.decode(IDENTITY, length=5,
- encoded=
+ encoded=
{"Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure."}));
set resp.http.list =
@@ -27,7 +27,7 @@ varnish v1 -vcl {
set resp.http.empty =
blob.encode(IDENTITY,
- blob=blob.decode(IDENTITY, length=5, encoded=""));
+ blob=blob.decode(IDENTITY, length=5, encoded=""));
set resp.http.undef =
blob.encode(IDENTITY, blob=blob.decode(IDENTITY, length=5,
diff --git a/bin/varnishtest/tests/m00035.vtc b/bin/varnishtest/tests/m00035.vtc
index 6190914..9f7df33 100644
--- a/bin/varnishtest/tests/m00035.vtc
+++ b/bin/varnishtest/tests/m00035.vtc
@@ -20,11 +20,11 @@ varnish v1 -arg "-p workspace_client=256k" -vcl {
set resp.http.hex =
blob.encode(HEX, blob=blob.decode(IDENTITY,
- encoded=req.http.pangram));
+ encoded=req.http.pangram));
set resp.http.hexlc =
blob.encode(HEX, LOWER,
- blob.decode(IDENTITY, encoded=req.http.pangram));
+ blob.decode(IDENTITY, encoded=req.http.pangram));
set resp.http.hexuc =
blob.encode(HEX, UPPER,
@@ -32,27 +32,27 @@ varnish v1 -arg "-p workspace_client=256k" -vcl {
set resp.http.hobbes =
blob.encode(HEX, blob=blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.hobbeslc =
blob.encode(HEX, LOWER, blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.hobbesuc =
blob.encode(HEX, UPPER, blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.all =
blob.encode(HEX, blob=blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.all-lc =
blob.encode(HEX, LOWER, blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.all-uc =
blob.encode(HEX, UPPER, blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.empty =
blob.encode(HEX, blob=blob.decode(IDENTITY, encoded=""));
@@ -99,19 +99,19 @@ varnish v1 -arg "-p workspace_client=256k" -vcl {
set resp.http.decalluc =
blob.encode(BASE64, blob=blob.decode(HEX,
- encoded=req.http.hexalluc));
+ encoded=req.http.hexalluc));
set resp.http.decalllc =
blob.encode(BASE64, blob=blob.decode(HEX,
- encoded=req.http.hexalllc));
+ encoded=req.http.hexalllc));
set resp.http.decallucodd =
blob.encode(BASE64,
- blob=blob.decode(HEX, encoded=req.http.hexallucodd));
+ blob=blob.decode(HEX, encoded=req.http.hexallucodd));
set resp.http.decalllcodd =
blob.encode(BASE64,
- blob=blob.decode(HEX, encoded=req.http.hexalllcodd));
+ blob=blob.decode(HEX, encoded=req.http.hexalllcodd));
set resp.http.decempty =
blob.encode(IDENTITY, blob=blob.decode(HEX, encoded=""));
@@ -125,13 +125,13 @@ varnish v1 -arg "-p workspace_client=256k" -vcl {
set resp.http.decemptypieces =
blob.encode(IDENTITY,
blob=blob.decode(HEX, encoded=req.http.unset + ""
- + req.http.unset + ""));
+ + req.http.unset + ""));
set req.http.part1 = "666";
set resp.http.dec2pieces =
blob.encode(IDENTITY, blob=blob.decode(HEX,
- encoded=req.http.part1 +
- "F6F206261722062617A2071757578"));
+ encoded=req.http.part1 +
+ "F6F206261722062617A2071757578"));
set req.http.part2 = "57578";
set resp.http.dec3param =
@@ -142,12 +142,12 @@ varnish v1 -arg "-p workspace_client=256k" -vcl {
set resp.http.dec3pieces =
blob.encode(IDENTITY, blob=blob.decode(HEX,
- encoded=req.http.part1 +
+ encoded=req.http.part1 +
"F6F206261722062617A20717" + req.http.part2));
set resp.http.decmanypieces =
blob.encode(IDENTITY, blob=blob.decode(HEX, encoded=
- "" + req.http.unset
+ "" + req.http.unset
+ req.http.part1 + req.http.unset + ""
+ req.http.unset + "" + "F6F206261722062617A20717"
+ "" + req.http.unset + req.http.part2
diff --git a/bin/varnishtest/tests/m00036.vtc b/bin/varnishtest/tests/m00036.vtc
index 635d726..12e1c24 100644
--- a/bin/varnishtest/tests/m00036.vtc
+++ b/bin/varnishtest/tests/m00036.vtc
@@ -20,7 +20,7 @@ varnish v1 -vcl {
set resp.http.hexlc =
blob.encode(HEX,
blob=blob.decode(IDENTITY, 5,
- encoded=req.http.pangram));
+ encoded=req.http.pangram));
set resp.http.hexuc =
blob.encode(HEX, UPPER,
@@ -28,20 +28,20 @@ varnish v1 -vcl {
set resp.http.hobbeslc =
blob.encode(HEX,
- blob=blob.decode(IDENTITY, 5,
- encoded=req.http.hobbes));
+ blob=blob.decode(IDENTITY, 5,
+ encoded=req.http.hobbes));
set resp.http.hobbesuc =
blob.encode(HEX, UPPER,
- blob.decode(IDENTITY, 5, encoded=req.http.hobbes));
+ blob.decode(IDENTITY, 5, encoded=req.http.hobbes));
set resp.http.all-lc =
blob.encode(HEX, blob=blob.decode(BASE64, 8,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.all-uc =
blob.encode(HEX, UPPER,
- blob.decode(BASE64, 8, encoded=req.http.b64all));
+ blob.decode(BASE64, 8, encoded=req.http.b64all));
set resp.http.empty-lc =
blob.encode(HEX, blob=blob.decode(IDENTITY, 5, encoded=""));
@@ -51,13 +51,13 @@ varnish v1 -vcl {
set resp.http.hexlcparam =
blob.encode(blob=blob.decode(IDENTITY, 5,
- encoded=req.http.pangram),
- encoding=HEX, case=LOWER);
+ encoded=req.http.pangram),
+ encoding=HEX, case=LOWER);
set resp.http.hexucparam =
blob.encode(blob=blob.decode(IDENTITY, 5,
- encoded=req.http.pangram),
- encoding=HEX, case=UPPER);
+ encoded=req.http.pangram),
+ encoding=HEX, case=UPPER);
set req.http.hexucfoobar = "666F6F206261722062617A2071757578";
set req.http.hexlcfoobar = std.tolower(req.http.hexucfoobar);
@@ -72,30 +72,30 @@ varnish v1 -vcl {
set resp.http.decuc =
blob.encode(IDENTITY,
blob=blob.decode(HEX, 10,
- encoded=req.http.hexucfoobar));
+ encoded=req.http.hexucfoobar));
set resp.http.declc =
blob.encode(IDENTITY,
blob=blob.decode(HEX, 10,
- encoded=req.http.hexlcfoobar));
+ encoded=req.http.hexlcfoobar));
set resp.http.dechobbesuc =
blob.encode(IDENTITY,
blob=blob.decode(HEX, 12,
- encoded=req.http.hexhobbesuc));
+ encoded=req.http.hexhobbesuc));
set resp.http.dechobbeslc =
blob.encode(IDENTITY,
blob=blob.decode(HEX, 12,
- encoded=req.http.hexhobbeslc));
+ encoded=req.http.hexhobbeslc));
set resp.http.decalluc =
blob.encode(BASE64,
- blob=blob.decode(HEX, 12, encoded=req.http.hexalluc));
+ blob=blob.decode(HEX, 12, encoded=req.http.hexalluc));
set resp.http.decalllc =
blob.encode(BASE64,
- blob=blob.decode(HEX, 12, encoded=req.http.hexalllc));
+ blob=blob.decode(HEX, 12, encoded=req.http.hexalllc));
set resp.http.decallucodd =
blob.encode(BASE64, blob=blob.decode(HEX, 11,
@@ -122,8 +122,8 @@ varnish v1 -vcl {
set req.http.part1 = "666";
set resp.http.dec2pieces =
blob.encode(IDENTITY, blob=blob.decode(HEX, 6,
- encoded=req.http.part1 +
- "F6F206261722062617A2071757578"));
+ encoded=req.http.part1 +
+ "F6F206261722062617A2071757578"));
set req.http.part2 = "57578";
set resp.http.dec3param =
@@ -134,12 +134,12 @@ varnish v1 -vcl {
set resp.http.dec3pieces =
blob.encode(IDENTITY, blob=blob.decode(HEX, 30,
- encoded=req.http.part1 +
+ encoded=req.http.part1 +
"F6F206261722062617A20717" + req.http.part2));
set resp.http.decmanypieces =
blob.encode(IDENTITY, blob=blob.decode(HEX, 20, encoded=""
- + req.http.unset
+ + req.http.unset
+ req.http.part1 + req.http.unset + ""
+ req.http.unset + "" + "F6F206261722062617A20717"
+ "" + req.http.unset + req.http.part2
@@ -192,7 +192,7 @@ varnish v1 -vcl+backend {
set req.http.foo = "123";
set resp.http.badhex = blob.encode(HEX, UPPER,
blob.decode(HEX, 2,
- encoded="g" + req.http.foo));
+ encoded="g" + req.http.foo));
}
}
diff --git a/bin/varnishtest/tests/m00037.vtc b/bin/varnishtest/tests/m00037.vtc
index e8ee70a..3209394 100644
--- a/bin/varnishtest/tests/m00037.vtc
+++ b/bin/varnishtest/tests/m00037.vtc
@@ -35,7 +35,7 @@ varnish v1 -vcl {
set resp.http.b64all =
blob.encode(BASE64, blob=blob.decode(HEX,
- encoded=req.http.hexall));
+ encoded=req.http.hexall));
set resp.http.b64url =
blob.encode(BASE64URL,
@@ -55,7 +55,7 @@ varnish v1 -vcl {
set resp.http.b64urlall =
blob.encode(BASE64URL, blob=blob.decode(HEX,
- encoded=req.http.hexall));
+ encoded=req.http.hexall));
set resp.http.b64urlnopad =
blob.encode(BASE64URLNOPAD,
@@ -83,7 +83,7 @@ varnish v1 -vcl {
blob.encode(BASE64URL, blob=blob.decode(IDENTITY, encoded=""));
set resp.http.nopadempty =
blob.encode(BASE64URLNOPAD,
- blob=blob.decode(IDENTITY, encoded=""));
+ blob=blob.decode(IDENTITY, encoded=""));
set resp.http.b64param =
blob.encode(blob=blob.decode(IDENTITY, encoded=req.http.pangram),
@@ -99,11 +99,11 @@ varnish v1 -vcl {
set resp.http.b64xcode =
blob.transcode(IDENTITY, BASE64,
- encoded=req.url + "Hello world" + req.url);
+ encoded=req.url + "Hello world" + req.url);
set resp.http.b64urlxcode =
blob.transcode(IDENTITY, BASE64URL,
- encoded=req.url + "Hello world" + req.url);
+ encoded=req.url + "Hello world" + req.url);
set resp.http.b64urlnopadxcode =
blob.transcode(IDENTITY, BASE64URLNOPAD,
@@ -161,7 +161,7 @@ varnish v1 -vcl {
set resp.http.dec = blob.encode(IDENTITY, blob=
blob.decode(BASE64,
- encoded=req.http.foobarbazquux));
+ encoded=req.http.foobarbazquux));
set resp.http.dec2
= blob.encode(IDENTITY,
@@ -184,13 +184,13 @@ varnish v1 -vcl {
set resp.http.nopaddechobbes =
blob.encode(IDENTITY,
- blob=blob.decode(BASE64URLNOPAD,
+ blob=blob.decode(BASE64URLNOPAD,
encoded=req.http.hobbesnopad));
set resp.http.nopaddecall =
blob.encode(HEX,
blob=blob.decode(BASE64URLNOPAD,
- encoded=req.http.allurl));
+ encoded=req.http.allurl));
set resp.http.b64empty =
blob.encode(IDENTITY, blob=blob.decode(BASE64, encoded=""));
@@ -198,7 +198,7 @@ varnish v1 -vcl {
blob.encode(IDENTITY, blob=blob.decode(BASE64URL, encoded=""));
set resp.http.nopadempty =
blob.encode(IDENTITY,
- blob=blob.decode(BASE64URLNOPAD, encoded=""));
+ blob=blob.decode(BASE64URLNOPAD, encoded=""));
set resp.http.emptypieces =
blob.encode(IDENTITY, blob=
blob.decode(BASE64, encoded=req.http.unset + "" + req.http.unset
@@ -207,7 +207,7 @@ varnish v1 -vcl {
set resp.http.decenc
= blob.encode(BASE64,
blob=blob.decode(BASE64,
- encoded=req.http.foobarbazquux));
+ encoded=req.http.foobarbazquux));
set resp.http.l = "L";
set resp.http.dec2pieces
@@ -305,7 +305,7 @@ varnish v1 -vcl+backend {
elsif (req.url == "/base64urlnopad") {
set resp.http.badpad = blob.encode(IDENTITY,
blob=blob.decode(BASE64URLNOPAD,
- encoded="TWFu" + req.http.foo));
+ encoded="TWFu" + req.http.foo));
}
}
}
diff --git a/bin/varnishtest/tests/m00039.vtc b/bin/varnishtest/tests/m00039.vtc
index 2149585..bfcd67e 100644
--- a/bin/varnishtest/tests/m00039.vtc
+++ b/bin/varnishtest/tests/m00039.vtc
@@ -23,75 +23,75 @@ varnish v1 -vcl {
set resp.http.url =
blob.encode(URL, blob=blob.decode(IDENTITY,
- encoded=req.http.pangram));
+ encoded=req.http.pangram));
set resp.http.urllc =
blob.encode(URL, LOWER, blob.decode(IDENTITY,
- encoded=req.http.pangram));
+ encoded=req.http.pangram));
set resp.http.urluc =
blob.encode(URL, UPPER, blob.decode(IDENTITY,
- encoded=req.http.pangram));
+ encoded=req.http.pangram));
set resp.http.hobbes =
blob.encode(URL, blob=blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.hobbeslc =
blob.encode(URL, LOWER, blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.hobbesuc =
blob.encode(URL, UPPER, blob.decode(IDENTITY,
- encoded=req.http.hobbes));
+ encoded=req.http.hobbes));
set resp.http.umlauts =
blob.encode(URL, blob=blob.decode(IDENTITY,
- encoded=req.http.umlauts));
+ encoded=req.http.umlauts));
set resp.http.umlautslc =
blob.encode(URL, LOWER, blob.decode(IDENTITY,
- encoded=req.http.umlauts));
+ encoded=req.http.umlauts));
set resp.http.umlautsuc =
blob.encode(URL, UPPER, blob.decode(IDENTITY,
- encoded=req.http.umlauts));
+ encoded=req.http.umlauts));
set resp.http.phk =
blob.encode(URL, blob=blob.decode(IDENTITY,
- encoded=req.http.phkspeak));
+ encoded=req.http.phkspeak));
set resp.http.phklc =
blob.encode(URL, LOWER, blob.decode(IDENTITY,
- encoded=req.http.phkspeak));
+ encoded=req.http.phkspeak));
set resp.http.phkuc =
blob.encode(URL, UPPER, blob.decode(IDENTITY,
- encoded=req.http.phkspeak));
+ encoded=req.http.phkspeak));
set resp.http.utf8 =
blob.encode(URL, blob=blob.decode(IDENTITY,
- encoded=req.http.utf8));
+ encoded=req.http.utf8));
set resp.http.utf8lc =
blob.encode(URL, LOWER, blob.decode(IDENTITY,
- encoded=req.http.utf8));
+ encoded=req.http.utf8));
set resp.http.utf8uc =
blob.encode(URL, UPPER, blob.decode(IDENTITY,
- encoded=req.http.utf8));
+ encoded=req.http.utf8));
set resp.http.all =
blob.encode(URL, blob=blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.all-lc =
blob.encode(URL, LOWER, blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.all-uc =
blob.encode(URL, UPPER, blob.decode(BASE64,
- encoded=req.http.b64all));
+ encoded=req.http.b64all));
set resp.http.empty =
blob.encode(URL, blob=blob.decode(IDENTITY, encoded=""));
@@ -175,7 +175,7 @@ varnish v1 -vcl {
set resp.http.decmixed =
blob.encode(IDENTITY,
blob=blob.decode(URL,
- encoded=req.http.urlmixedfoobar));
+ encoded=req.http.urlmixedfoobar));
set resp.http.dechobbesuc =
blob.encode(IDENTITY,
@@ -211,11 +211,11 @@ varnish v1 -vcl {
set resp.http.decalluc =
blob.encode(BASE64, blob=blob.decode(URL,
- encoded=req.http.urlalluc));
+ encoded=req.http.urlalluc));
set resp.http.decalllc =
blob.encode(BASE64, blob=blob.decode(URL,
- encoded=req.http.urlalllc));
+ encoded=req.http.urlalllc));
set resp.http.decempty =
blob.encode(IDENTITY, blob=blob.decode(URL, encoded=""));
@@ -231,8 +231,8 @@ varnish v1 -vcl {
set req.http.part1 = "foo%";
set resp.http.dec2pieces =
blob.encode(IDENTITY, blob=blob.decode(URL,
- encoded=req.http.part1 +
- "20bar%20baz%20quux"));
+ encoded=req.http.part1 +
+ "20bar%20baz%20quux"));
set req.http.part2 = "0quux";
set resp.http.dec3param =
@@ -243,11 +243,11 @@ varnish v1 -vcl {
set resp.http.dec3pieces =
blob.encode(IDENTITY, blob=blob.decode(URL, encoded=
- req.http.part1 + "20bar%20baz%2" + req.http.part2));
+ req.http.part1 + "20bar%20baz%2" + req.http.part2));
set resp.http.decmanypieces =
blob.encode(IDENTITY, blob=blob.decode(URL, encoded=
- "" + req.http.unset
+ "" + req.http.unset
+ req.http.part1 + req.http.unset + ""
+ req.http.unset + "" + "20bar%20baz%2"
+ "" + req.http.unset + req.http.part2
@@ -294,7 +294,7 @@ varnish v1 -vcl+backend {
if (req.url == "/percent") {
set resp.http.bad
= blob.encode(URL, UPPER, blob.decode(URL,
- encoded="%"));
+ encoded="%"));
}
elsif (req.url == "/percent-two") {
set resp.http.bad = blob.encode(URL, UPPER,
diff --git a/bin/varnishtest/tests/m00041.vtc b/bin/varnishtest/tests/m00041.vtc
index 4056d9c..4c543d8 100644
--- a/bin/varnishtest/tests/m00041.vtc
+++ b/bin/varnishtest/tests/m00041.vtc
@@ -302,7 +302,7 @@ varnish v1 -vcl {
set resp.http.urlalldownuc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD,
- encoded=req.http.urlalldownuc);
+ encoded=req.http.urlalldownuc);
set resp.http.urlalldownlc2b64
= blob.transcode(URL, BASE64, encoded=req.http.urlalldownlc);
@@ -312,7 +312,7 @@ varnish v1 -vcl {
set resp.http.urlalldownlc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD,
- encoded=req.http.urlalldownlc);
+ encoded=req.http.urlalldownlc);
set resp.http.urlallupuc2b64
= blob.transcode(URL, BASE64, encoded=req.http.urlallupuc);
diff --git a/bin/varnishtest/tests/m00042.vtc b/bin/varnishtest/tests/m00042.vtc
index ecd8b44..aaac4b9 100644
--- a/bin/varnishtest/tests/m00042.vtc
+++ b/bin/varnishtest/tests/m00042.vtc
@@ -23,15 +23,15 @@ varnish v1 -vcl {
set resp.http.id2id
= blob.transcode(IDENTITY, IDENTITY, length=5,
- encoded="Hello world");
+ encoded="Hello world");
set resp.http.id2b64
= blob.transcode(IDENTITY, BASE64, length=5,
- encoded=req.http.hobbes);
+ encoded=req.http.hobbes);
set resp.http.id2b64nopad
= blob.transcode(IDENTITY, BASE64URLNOPAD, length=5,
- encoded=req.http.hobbes);
+ encoded=req.http.hobbes);
set resp.http.id2hex
= blob.transcode(IDENTITY, HEX, length=5, encoded=req.http.hobbes);
@@ -53,34 +53,34 @@ varnish v1 -vcl {
set resp.http.b642id
= blob.transcode(BASE64, IDENTITY, length=8,
- encoded=req.http.hobbesb64);
+ encoded=req.http.hobbesb64);
set resp.http.hex2id
= blob.transcode(HEX, IDENTITY, length=12,
- encoded=req.http.hexhobbes);
+ encoded=req.http.hexhobbes);
set resp.http.hexalldown2b64
= blob.transcode(HEX, BASE64, length=12,
- encoded=req.http.hexalldown);
+ encoded=req.http.hexalldown);
set resp.http.hexalldown2b64url
= blob.transcode(HEX, BASE64URL, length=12,
- encoded=req.http.hexalldown);
+ encoded=req.http.hexalldown);
set resp.http.hexalldown2b64nopad
= blob.transcode(HEX, BASE64URLNOPAD, length=10,
- encoded=req.http.hexalldown);
+ encoded=req.http.hexalldown);
set resp.http.hexallup2b64
= blob.transcode(HEX, BASE64, length=12, encoded=req.http.hexallup);
set resp.http.hexallup2b64url
= blob.transcode(HEX, BASE64URL, length=10,
- encoded=req.http.hexallup);
+ encoded=req.http.hexallup);
set resp.http.hexallup2b64nopad
= blob.transcode(HEX, BASE64URLNOPAD, length=10,
- encoded=req.http.hexallup);
+ encoded=req.http.hexallup);
set resp.http.hexalldown2url
= blob.transcode(HEX, URL, length=12, encoded=req.http.hexalldown);
@@ -157,7 +157,7 @@ varnish v1 -vcl {
set resp.http.b64allurl2hex
= blob.transcode(BASE64URL, HEX, length=8,
- encoded=req.http.b64allurl);
+ encoded=req.http.b64allurl);
set resp.http.b64allurl2hexuc
= blob.transcode(BASE64URL, HEX, UPPER, 8, req.http.b64allurl);
@@ -176,7 +176,7 @@ varnish v1 -vcl {
set resp.http.b64allurl2url
= blob.transcode(BASE64URL, URL, length=8,
- encoded=req.http.b64allurl);
+ encoded=req.http.b64allurl);
set resp.http.b64allurl2urluc
= blob.transcode(BASE64URL, URL, UPPER, 8, req.http.b64allurl);
@@ -286,19 +286,19 @@ varnish v1 -vcl {
set resp.http.urluc2id
= blob.transcode(URL, IDENTITY, length=27,
- encoded=req.http.urlhobbesuc);
+ encoded=req.http.urlhobbesuc);
set resp.http.urllc2id
= blob.transcode(URL, IDENTITY, length=63,
- encoded=req.http.urlhobbeslc);
+ encoded=req.http.urlhobbeslc);
set resp.http.urlalldownuc2b64
= blob.transcode(URL, BASE64, length=18,
- encoded=req.http.urlalldownuc);
+ encoded=req.http.urlalldownuc);
set resp.http.urlalldownuc2b64url
= blob.transcode(URL, BASE64URL, length=15,
- encoded=req.http.urlalldownuc);
+ encoded=req.http.urlalldownuc);
set resp.http.urlalldownuc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD, length=15,
@@ -306,11 +306,11 @@ varnish v1 -vcl {
set resp.http.urlalldownlc2b64
= blob.transcode(URL, BASE64, length=18,
- encoded=req.http.urlalldownlc);
+ encoded=req.http.urlalldownlc);
set resp.http.urlalldownlc2b64url
= blob.transcode(URL, BASE64URL, length=15,
- encoded=req.http.urlalldownlc);
+ encoded=req.http.urlalldownlc);
set resp.http.urlalldownlc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD, length=15,
@@ -318,11 +318,11 @@ varnish v1 -vcl {
set resp.http.urlallupuc2b64
= blob.transcode(URL, BASE64, length=36,
- encoded=req.http.urlallupuc);
+ encoded=req.http.urlallupuc);
set resp.http.urlallupuc2b64url
= blob.transcode(URL, BASE64URL, length=33,
- encoded=req.http.urlallupuc);
+ encoded=req.http.urlallupuc);
set resp.http.urlallupuc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD, length=33,
@@ -330,11 +330,11 @@ varnish v1 -vcl {
set resp.http.urlalluplc2b64
= blob.transcode(URL, BASE64, length=36,
- encoded=req.http.urlalluplc);
+ encoded=req.http.urlalluplc);
set resp.http.urlalluplc2b64url
= blob.transcode(URL, BASE64URL, length=33,
- encoded=req.http.urlalluplc);
+ encoded=req.http.urlalluplc);
set resp.http.urlalluplc2b64nopad
= blob.transcode(URL, BASE64URLNOPAD, length=33,
@@ -342,7 +342,7 @@ varnish v1 -vcl {
set resp.http.urlalldownuc2url
= blob.transcode(URL, URL, length=423,
- encoded=req.http.urlalldownuc);
+ encoded=req.http.urlalldownuc);
set resp.http.urlalldownuc2urluc
= blob.transcode(URL, URL, UPPER, 423, req.http.urlalldownuc);
@@ -352,7 +352,7 @@ varnish v1 -vcl {
set resp.http.urlalldownlc2url
= blob.transcode(URL, URL, length=423,
- encoded=req.http.urlalldownlc);
+ encoded=req.http.urlalldownlc);
set resp.http.urlalldownlc2urluc
= blob.transcode(URL, URL, UPPER, 423, req.http.urlalldownlc);
@@ -427,12 +427,12 @@ varnish v1 -vcl+backend {
if (req.url == "/1") {
set resp.http.good
= blob.transcode(URL, IDENTITY, length=3,
- encoded="%2c%q");
+ encoded="%2c%q");
}
elsif (req.url == "/2") {
set resp.http.good
= blob.transcode(URL, IDENTITY, length=3,
- encoded="%3a%2q");
+ encoded="%3a%2q");
}
elsif (req.url == "/3") {
set resp.http.bad
@@ -473,12 +473,12 @@ varnish v1 -vcl+backend {
elsif (req.url == "/10") {
set resp.http.bad
= blob.transcode(URL, IDENTITY, length=1,
- encoded="%20");
+ encoded="%20");
}
elsif (req.url == "/11") {
set resp.http.bad
= blob.transcode(URL, IDENTITY, length=2,
- encoded="%20");
+ encoded="%20");
}
}
}
diff --git a/bin/varnishtest/tests/m00044.vtc b/bin/varnishtest/tests/m00044.vtc
index e68374a..edad4d4 100644
--- a/bin/varnishtest/tests/m00044.vtc
+++ b/bin/varnishtest/tests/m00044.vtc
@@ -36,7 +36,7 @@ varnish v1 -arg "-p http_max_hdr=128" -vcl+backend {
# transcode() converts from one encoding to another.
set req.http.Hex-Encoded
= blob.transcode(decoding=BASE64, encoding=HEX, case=UPPER,
- encoded="YmF6");
+ encoded="YmF6");
# transcode() can replace other specific encoding/deconding
# vmods - e.g. vmod_urlcode
@@ -54,7 +54,7 @@ varnish v1 -arg "-p http_max_hdr=128" -vcl+backend {
sub vcl_deliver {
set resp.http.Trunced-Foo1
= blob.encode(IDENTITY, blob=blob.decode(HEX,
- encoded="666f6f00626172"));
+ encoded="666f6f00626172"));
set resp.http.Trunced-Foo2
= blob.encode(blob=blob.decode(HEX, encoded="666f6f00626172"));
}
@@ -74,7 +74,7 @@ varnish v1 -arg "-p http_max_hdr=128" -vcl+backend {
sub vcl_deliver {
set resp.http.encode1
= blob.encode(HEX, blob=blob.decode(BASE64,
- encoded="Zm9vYmFyYmF6"));
+ encoded="Zm9vYmFyYmF6"));
# same with named parameters
set resp.http.encode2
diff --git a/bin/varnishtest/tests/m00045.vtc b/bin/varnishtest/tests/m00045.vtc
index d82e7f5..345534c 100644
--- a/bin/varnishtest/tests/m00045.vtc
+++ b/bin/varnishtest/tests/m00045.vtc
@@ -188,10 +188,10 @@ varnish v1 -vcl {
= blob.encode(BASE64, blob=blob.sub(down07.get(), 4B));
set resp.http.up04050607
= blob.encode(BASE64,
- blob=blob.sub(up07.get(), 4B, 4B));
+ blob=blob.sub(up07.get(), 4B, 4B));
set resp.http.down03
= blob.encode(BASE64,
- blob=blob.sub(down07.get(), 4B, 4B));
+ blob=blob.sub(down07.get(), 4B, 4B));
set resp.http.up07
= blob.encode(BASE64, blob=blob.sub(up07.get(), 8B));
set resp.http.down07
@@ -239,7 +239,7 @@ varnish v1 -vcl+backend {
elsif (req.url == "/toolong") {
set resp.http.toolong
= blob.encode(BASE64,
- blob=blob.sub(up07.get(), 9B));
+ blob=blob.sub(up07.get(), 9B));
}
elsif (req.url == "/badoffset") {
set resp.http.badoffset = blob.encode(BASE64,
diff --git a/lib/libvmod_blob/vmod.vcc b/lib/libvmod_blob/vmod.vcc
index 2c4df6d..48e42c3 100644
--- a/lib/libvmod_blob/vmod.vcc
+++ b/lib/libvmod_blob/vmod.vcc
@@ -52,9 +52,9 @@ Examples::
# decode() and encode() functions convert blobs to text and
# vice versa at runtime.
set resp.http.Base64-Encoded
- = blob.encode(BASE64,
- blob=blob.decode(HEX,
- encoded=req.http.Hex-Encoded));
+ = blob.encode(BASE64,
+ blob=blob.decode(HEX,
+ encoded=req.http.Hex-Encoded));
}
sub vcl_recv {
@@ -122,7 +122,7 @@ blob. For example::
# The header will be seen as "foo".
set resp.http.Trunced-Foo1
= blob.encode(IDENTITY, blob=blob.decode(HEX,
- encoded="666f6f00626172"));
+ encoded="666f6f00626172"));
IDENTITY is the default encoding and decoding. So the above can also
be written as::
@@ -175,7 +175,7 @@ byte. For example::
set resp.http.Second = "def0";
set resp.http.Hex-Decoded
= blob.encode(HEX, blob=blob.decode(HEX,
- encoded=resp.http.First + resp.http.Second));
+ encoded=resp.http.First + resp.http.Second));
URL
---
@@ -188,8 +188,8 @@ The ``URL`` encoding implements "percent encoding" as per RFC3986. The
affect alphabetic characters that are not percent-encoded.
$Function BLOB decode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD,
- HEX, URL} decoding="IDENTITY", INT length=0,
- STRING_LIST encoded)
+ HEX, URL} decoding="IDENTITY", INT length=0,
+ STRING_LIST encoded)
Returns the BLOB derived from the string ``encoded`` according to the
scheme specified by ``decoding``.
@@ -225,7 +225,7 @@ Example::
set resp.http.encode1
= blob.encode(HEX,
- blob=blob.decode(BASE64, encoded="Zm9vYmFyYmF6"));
+ blob=blob.decode(BASE64, encoded="Zm9vYmFyYmF6"));
# same with named parameters
set resp.http.encode2
@@ -260,7 +260,7 @@ defaults to LOWER.
Example::
set resp.http.Hex2Base64-1
- = blob.transcode(HEX, BASE64, encoded="666f6f");
+ = blob.transcode(HEX, BASE64, encoded="666f6f");
# same with named parameters
set resp.http.Hex2Base64-2
More information about the varnish-commit
mailing list