File tree Expand file tree Collapse file tree 9 files changed +41
-2
lines changed
tests/Functional/Fixtures/web Expand file tree Collapse file tree 9 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header ('Content-Type: text/html ' );
14
16
header ('X-Cache-Debug: 1 ' );
17
+ header ('Content-Length: ' . strlen ($ mt ));
15
18
16
- echo microtime ( true ) ;
19
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: s-maxage=0 ' );
13
15
header ('X-Reverse-Proxy-TTL: 3600 ' );
14
16
header ('Content-Type: text/html ' );
15
17
header ('X-Cache-Debug: 1 ' );
18
+ header ('Content-Length: ' . strlen ($ mt ));
16
19
17
- echo microtime ( true ) ;
20
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header ('Content-Type: text/json ' );
14
16
header ('X-Cache-Debug: 1 ' );
17
+ header ('Content-Length: ' . strlen ($ mt ));
18
+
19
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header (sprintf ('Content-Type: %s ' , $ _SERVER ['HTTP_ACCEPT ' ]));
14
16
header ('X-Cache-Debug: 1 ' );
15
17
header ('Vary: Accept ' );
18
+ header ('Content-Length: ' . strlen ($ mt ));
19
+
20
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header ('Content-Type: text/html ' );
14
16
header ('X-Cache-Tags: tag1,tag2 ' );
15
17
header ('X-LiteSpeed-Tag: tag1, tag2 ' ); // For LiteSpeed
16
18
header ('X-Cache-Debug: 1 ' );
19
+ header ('Content-Length: ' . strlen ($ mt ));
20
+
21
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header ('Content-Type: text/html ' );
14
16
header ('X-Cache-Tags: tag1 ' );
15
17
header ('X-Cache-Tags: tag2 ' );
16
18
header ('X-Cache-Debug: 1 ' );
19
+ header ('Content-Length: ' . strlen ($ mt ));
20
+
21
+ echo $ mt ;
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
+ $ mt = microtime (true );
13
+
12
14
header ('Cache-Control: max-age=3600 ' );
13
15
header ('Content-Type: text/html ' );
14
16
header ('xkey: tag1 tag2 ' );
15
17
header ('X-Cache-Debug: 1 ' );
18
+ header ('Content-Length: ' . strlen ($ mt ));
19
+
20
+ echo $ mt ;
Original file line number Diff line number Diff line change 22
22
}
23
23
24
24
if ('POST ' === strtoupper ($ _SERVER ['REQUEST_METHOD ' ])) {
25
+ header ('Content-Length: 4 ' );
25
26
echo 'POST ' ;
26
27
exit ;
27
28
}
33
34
34
35
header ('Cache-Control: max-age=3600 ' );
35
36
header ('Vary: X-User-Context-Hash ' );
37
+ header ('Content-Length: 3 ' );
36
38
37
39
if ('foo ' === $ _COOKIE [0 ]) {
38
40
header ('X-HashTest: foo ' );
Original file line number Diff line number Diff line change 16
16
17
17
if (!isset ($ _COOKIE [0 ])) {
18
18
header ('X-HashTest: anonymous ' );
19
+ header ('Content-Length: 9 ' );
20
+
19
21
echo 'anonymous ' ;
20
22
} elseif ('foo ' === $ _COOKIE [0 ]) {
21
23
header ('X-HashTest: foo ' );
24
+ header ('Content-Length: 3 ' );
25
+
22
26
echo 'foo ' ;
23
27
} else {
24
28
header ('X-HashTest: bar ' );
29
+ header ('Content-Length: 3 ' );
30
+
25
31
echo 'bar ' ;
26
32
}
You can’t perform that action at this time.
0 commit comments