Test UTF-8 and escaped characters

parent 64673625
......@@ -3,7 +3,7 @@ varnishtest "test vmod-frozen"
server s1 {
rxreq
txresp -nolen -hdr "Transfer-Encoding: chunked"
chunked "{ a: 1, b: \"hi there\", c: true, d: false, "
chunked "{ a: 1, b: \"hi €\\t\\\" there\", c: true, d: false, "
chunked " e : null, f: [ 1, -2, 3], g: { \"1\": [], h"
chunked ": [ 7 ] } } "
chunkedlen 0
......@@ -80,7 +80,7 @@ varnish v1 -vcl+backend {
if (req.url == "/static") {
set resp.http.parse =
p_test.parse(
{"{ a: 1, b: "hi there", c: true, d: false, "} +
{"{ a: 1, b: "hi €\t\" there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h"} +
{": [ 7 ] } } "});
}
......@@ -109,7 +109,7 @@ client c1 {
expect resp.http.parse == true
expect resp.http.a == 1
expect resp.http.a-type == NUMBER
expect resp.http.b == "hi there"
expect resp.http.b == "hi €\\t\\\" there"
expect resp.http.b-type == STRING
expect resp.http.c == true
expect resp.http.c-type == BOOL
......@@ -135,7 +135,7 @@ client c1 {
client c2 {
txreq -url "/req.body" -hdr "max: 1K" \
-nolen -hdr "Transfer-Encoding: chunked"
chunked "{ a: 1, b: \"hi there\", c: true, d: false, "
chunked "{ a: 1, b: \"hi €\\t\\\" there\", c: true, d: false, "
chunked " e : null, f: [ 1, -2, 3], g: { \"1\": [], h"
chunked ": [ 7 ] } } "
chunkedlen 0
......@@ -146,7 +146,7 @@ client c2 {
expect resp.http.parse == true
expect resp.http.a == 1
expect resp.http.a-type == NUMBER
expect resp.http.b == "hi there"
expect resp.http.b == "hi €\\t\\\" there"
expect resp.http.b-type == STRING
expect resp.http.c == true
expect resp.http.c-type == BOOL
......@@ -172,7 +172,7 @@ client c2 {
client c3 {
txreq -url "/req.body" -hdr "cache: true" -hdr "max: 1K" \
-nolen -hdr "Transfer-Encoding: chunked"
chunked "{ a: 1, b: \"hi there\", c: true, d: false, "
chunked "{ a: 1, b: \"hi €\\t\\\" there\", c: true, d: false, "
chunked " e : null, f: [ 1, -2, 3], g: { \"1\": [], h"
chunked ": [ 7 ] } } "
chunkedlen 0
......@@ -183,7 +183,7 @@ client c3 {
expect resp.http.parse == true
expect resp.http.a == 1
expect resp.http.a-type == NUMBER
expect resp.http.b == "hi there"
expect resp.http.b == "hi €\\t\\\" there"
expect resp.http.b-type == STRING
expect resp.http.c == true
expect resp.http.c-type == BOOL
......@@ -215,7 +215,7 @@ client c4 {
expect resp.http.parse == true
expect resp.http.a == 1
expect resp.http.a-type == NUMBER
expect resp.http.b == "hi there"
expect resp.http.b == "hi €\\t\\\" there"
expect resp.http.b-type == STRING
expect resp.http.c == true
expect resp.http.c-type == BOOL
......@@ -249,7 +249,7 @@ logexpect l11 -v v1 -q "ReqURL ~ \"^/req.body\" and ReqHeader:max ~ \"^10B\"" {
client c11 {
txreq -url "/req.body" -hdr "max: 10B" \
-nolen -hdr "Transfer-Encoding: chunked"
chunked "{ a: 1, b: \"hi there\", c: true, d: false, "
chunked "{ a: 1, b: \"hi €\\t\\\" there\", c: true, d: false, "
chunked " e : null, f: [ 1, -2, 3], g: { \"1\": [], h"
chunked ": [ 7 ] } } "
chunkedlen 0
......
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