File: std_b00007.vtc

package info (click to toggle)
varnish 7.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,256 kB
  • sloc: ansic: 104,222; python: 2,679; makefile: 1,303; sh: 1,077; awk: 114; perl: 105; ruby: 41
file content (58 lines) | stat: -rw-r--r-- 936 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
varnishtest "Test std.querysort"

server s1 -repeat 6 {
	rxreq
	txresp
} -start

varnish v1 -vcl+backend {
	import std;

	sub vcl_deliver {
		set resp.http.url = std.querysort(req.http.url);
	}
} -start

client c1 {
	txreq -hdr "url: /foo/bar?t=0&b=0&p=0&c=5"
	rxresp
	expect resp.http.url == "/foo/bar?b=0&c=5&p=0&t=0"

	delay .1

	txreq -hdr "url: /foo/bar?coa=0&co=0"
	rxresp
	expect resp.http.url == "/foo/bar?co=0&coa=0"

	delay .1

	txreq -hdr "url: /foo/bar?a=0&&&&&"
	rxresp
	expect resp.http.url == "/foo/bar?a=0"

	txreq -hdr "url: /foo/bar?&a=0&&&&&z&w&x&"
	rxresp
	expect resp.http.url == "/foo/bar?a=0&w&x&z"

	delay .1

	txreq -hdr "url: /foo/bar?&"
	rxresp
	expect resp.http.url == "/foo/bar?"

	delay .1

	txreq -hdr "url: /foo/bar?t=0"
	rxresp
	expect resp.http.url == "/foo/bar?t=0"

	delay .1

	txreq -hdr "url: /foo/bar"
	rxresp
	expect resp.http.url == "/foo/bar"

	txreq
	rxresp
	expect resp.http.url == ""
} -run