xref: /curl/tests/data/test1542 (revision c9b95c0b)
1<testcase>
2<info>
3<keywords>
4HTTP
5connection reuse
6persistent connection
7CURLOPT_MAXLIFETIME_CONN
8verbose logs
9</keywords>
10</info>
11
12# Server-side
13<reply>
14<data nocheck="yes">
15HTTP/1.1 200 OK
16Content-Length: 0
17
18</data>
19</reply>
20
21# Client-side
22<client>
23<server>
24http
25</server>
26<tool>
27lib%TESTNUMBER
28</tool>
29<name>
30connection reuse with CURLOPT_MAXLIFETIME_CONN
31</name>
32<command>
33http://%HOSTIP:%HTTPPORT/%TESTNUMBER
34</command>
35</client>
36
37# Verify data after the test has been "shot"
38<verify>
39<protocol>
40GET /%TESTNUMBER HTTP/1.1
41Host: %HOSTIP:%HTTPPORT
42Accept: */*
43
44GET /%TESTNUMBER HTTP/1.1
45Host: %HOSTIP:%HTTPPORT
46Accept: */*
47
48GET /%TESTNUMBER HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50Accept: */*
51
52GET /%TESTNUMBER HTTP/1.1
53Host: %HOSTIP:%HTTPPORT
54Accept: */*
55
56</protocol>
57<file name="%LOGDIR/stderr%TESTNUMBER" mode="text">
58== Info: Connection #0 to host %HOSTIP left intact
59== Info: Connection #0 to host %HOSTIP left intact
60== Info: Connection #0 to host %HOSTIP left intact
61== Info: shutting down connection #0
62== Info: Connection #1 to host %HOSTIP left intact
63</file>
64<stripfile>
65$_ = '' if (($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
66</stripfile>
67</verify>
68</testcase>
69