• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP PUT
6Expect: 100-continue
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data nocheck="yes">
14HTTP/1.1 400 NOOOOOOOOO
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Length: 9
18Content-Type: text/html
19
20FAILURE1
21</data>
22
23<data1>
24HTTP/1.1 400 NEITHER
25Date: Tue, 09 Nov 2010 14:49:00 GMT
26Server: test-server/fake
27Content-Length: 9
28Content-Type: text/html
29
30FAILURE2
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">
46XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
47</file>
48<server>
49http
50</server>
51<name>
52HTTP PUT expect 100-continue with a 400
53</name>
54 <command option="no-output">
55-H "Expect: 100-continue" -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 --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 400 NOOOOOOOOO
64Date: Tue, 09 Nov 2010 14:49:00 GMT
65Server: test-server/fake
66Content-Length: 9
67Content-Type: text/html
68
69FAILURE1
70HTTP/1.1 400 NEITHER
71Date: Tue, 09 Nov 2010 14:49:00 GMT
72Server: test-server/fake
73Content-Length: 9
74Content-Type: text/html
75
76FAILURE2
77</stdout>
78<protocol>
79PUT /%TESTNUMBER HTTP/1.1
80Host: %HOSTIP:%HTTPPORT
81User-Agent: curl/%VERSION
82Accept: */*
83Expect: 100-continue
84Content-Length: 100
85
86PUT /%TESTNUMBER0001 HTTP/1.1
87Host: %HOSTIP:%HTTPPORT
88User-Agent: curl/%VERSION
89Accept: */*
90Expect: 100-continue
91Content-Length: 100
92
93</protocol>
94</verify>
95</testcase>
96