xref: /curl/tests/data/test1130 (revision 61c8f1ed)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6Expect: 100-continue
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data nocheck="yes">
14HTTP/1.1 404 NOOOOOOOOO
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Length: 6
18Content-Type: text/html
19
20-foo-
21</data>
22
23<data1>
24HTTP/1.1 404 NEITHER
25Date: Tue, 09 Nov 2010 14:49:00 GMT
26Server: test-server/fake
27Content-Length: 6
28Content-Type: text/html
29
30-foo-
31</data1>
32
33# We use skip to make the test server never read the full payload off
34# the socket and instead return the response at once. In actuality, the
35# long --expect100-timeout means that it will never get a chance to read this.
36<servercmd>
37skip: 100
38</servercmd>
39</reply>
40
41#
42# Client-side
43<client>
44# 100 x 'x'
45<file name="%LOGDIR/file%TESTNUMBER">
46XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
47</file>
48<server>
49http
50</server>
51<name>
52HTTP POST forced expect 100-continue with a 404
53</name>
54 <command option="no-output">
55-d @%LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue" --expect100-timeout 99
56</command>
57</client>
58
59#
60# Verify data after the test has been "shot"
61<verify>
62<stdout>
63HTTP/1.1 404 NOOOOOOOOO
64Date: Tue, 09 Nov 2010 14:49:00 GMT
65Server: test-server/fake
66Content-Length: 6
67Content-Type: text/html
68
69-foo-
70HTTP/1.1 404 NEITHER
71Date: Tue, 09 Nov 2010 14:49:00 GMT
72Server: test-server/fake
73Content-Length: 6
74Content-Type: text/html
75
76-foo-
77</stdout>
78<protocol>
79POST /%TESTNUMBER HTTP/1.1
80Host: %HOSTIP:%HTTPPORT
81User-Agent: curl/%VERSION
82Accept: */*
83Expect: 100-continue
84Content-Length: 100
85Content-Type: application/x-www-form-urlencoded
86
87POST /%TESTNUMBER0001 HTTP/1.1
88Host: %HOSTIP:%HTTPPORT
89User-Agent: curl/%VERSION
90Accept: */*
91Expect: 100-continue
92Content-Length: 100
93Content-Type: application/x-www-form-urlencoded
94
95</protocol>
96</verify>
97</testcase>
98