xref: /curl/tests/data/test1457 (revision 30e50de5)
1<testcase>
2<info>
3<keywords>
4HTTP
5protocol
6--write-out
7</keywords>
8</info>
9# Server-side
10<reply>
11<data nocheck="yes">
12HTTP/1.1 200 OK
13Date: Tue, 09 Nov 2010 14:49:00 GMT
14Content-Length: 9
15Connection: close
16Content-Type: text/plain
17
18testdata
19</data>
20
21</reply>
22
23# Client-side
24<client>
25<server>
26http
27</server>
28
29<name>
30Check if %{stderr} and %{stdout} switch between stdout and stderr.
31</name>
32<command>
33http://%HOSTIP:%HTTPPORT/%TESTNUMBER --silent --write-out 'line1%{stderr}line2%{stdout}line3'
34</command>
35</client>
36
37# Verify data
38<verify>
39<stdout nonewline="yes">
40HTTP/1.1 200 OK
41Date: Tue, 09 Nov 2010 14:49:00 GMT
42Content-Length: 9
43Connection: close
44Content-Type: text/plain
45
46testdata
47line1line3
48</stdout>
49<stderr nonewline="yes">
50line2
51</stderr>
52<protocol>
53GET /%TESTNUMBER HTTP/1.1
54Host: %HOSTIP:%HTTPPORT
55User-Agent: curl/%VERSION
56Accept: */*
57
58</protocol>
59</verify>
60</testcase>
61