~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to tests/data/test1051

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<testcase>
 
2
<info>
 
3
<keywords>
 
4
HTTP
 
5
HTTP PUT
 
6
followlocation
 
7
</keywords>
 
8
 
 
9
</info>
 
10
# Server-side
 
11
<reply>
 
12
<data>
 
13
HTTP/1.1 301 Redirect swsclose
 
14
Date: Thu, 29 Jul 2008 14:49:00 GMT
 
15
Server: test-server/fake
 
16
Location: data/10510002.txt?coolsite=yes
 
17
Content-Length: 0
 
18
Connection: close
 
19
 
 
20
</data>
 
21
<data2>
 
22
HTTP/1.1 100 Continue
 
23
 
 
24
HTTP/1.1 200 Followed here fine swsclose
 
25
Date: Thu, 29 Jul 2008 14:49:00 GMT
 
26
Server: test-server/fake
 
27
Content-Length: 51
 
28
 
 
29
If this is received, the location following worked
 
30
</data2>
 
31
<datacheck>
 
32
HTTP/1.1 301 Redirect swsclose
 
33
Date: Thu, 29 Jul 2008 14:49:00 GMT
 
34
Server: test-server/fake
 
35
Location: data/10510002.txt?coolsite=yes
 
36
Content-Length: 0
 
37
Connection: close
 
38
 
 
39
HTTP/1.1 100 Continue
 
40
 
 
41
HTTP/1.1 200 Followed here fine swsclose
 
42
Date: Thu, 29 Jul 2008 14:49:00 GMT
 
43
Server: test-server/fake
 
44
Content-Length: 51
 
45
 
 
46
If this is received, the location following worked
 
47
</datacheck>
 
48
</reply>
 
49
 
 
50
# Client-side
 
51
<client>
 
52
<server>
 
53
http
 
54
</server>
 
55
 <name>
 
56
HTTP PUT with Location: following
 
57
 </name>
 
58
 <command>
 
59
http://%HOSTIP:%HTTPPORT/want/1051 -L -T log/test1051.txt
 
60
</command>
 
61
<file name="log/test1051.txt">
 
62
Weird
 
63
     file
 
64
         to
 
65
   upload
 
66
for
 
67
   testing
 
68
the
 
69
   PUT
 
70
      feature
 
71
</file>
 
72
</client>
 
73
 
 
74
# Verify data after the test has been "shot"
 
75
<verify>
 
76
<strip>
 
77
^User-Agent:.*
 
78
</strip>
 
79
 
 
80
# The primary reason libcurl sends the data part twice in this test is that
 
81
# the test HTTP server is blocking until it has read the entire request,
 
82
# including the full request-body before it responds. So in this test the
 
83
# server says 301 and 100 _after_ the entire PUT body has been sent.
 
84
 
 
85
<protocol>
 
86
PUT /want/1051 HTTP/1.1
 
87
Host: %HOSTIP:%HTTPPORT
 
88
Accept: */*
 
89
Content-Length: 78
 
90
Expect: 100-continue
 
91
 
 
92
Weird
 
93
     file
 
94
         to
 
95
   upload
 
96
for
 
97
   testing
 
98
the
 
99
   PUT
 
100
      feature
 
101
PUT /want/data/10510002.txt?coolsite=yes HTTP/1.1
 
102
Host: %HOSTIP:%HTTPPORT
 
103
Accept: */*
 
104
Content-Length: 78
 
105
Expect: 100-continue
 
106
 
 
107
Weird
 
108
     file
 
109
         to
 
110
   upload
 
111
for
 
112
   testing
 
113
the
 
114
   PUT
 
115
      feature
 
116
</protocol>
 
117
</verify>
 
118
</testcase>