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

« back to all changes in this revision

Viewing changes to tests/data/test1081

  • 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 GET
 
6
redirect_url
 
7
followlocation
 
8
--write-out
 
9
</keywords>
 
10
</info>
 
11
 
 
12
# Server-side
 
13
<reply>
 
14
<data nocheck="yes">
 
15
HTTP/1.1 301 This is a weirdo text message swsclose
 
16
Location: data/10810099.txt?coolsite=yes
 
17
Content-Length: 62
 
18
Connection: close
 
19
 
 
20
This server reply is for testing a simple Location: following
 
21
</data>
 
22
<data2 nocheck="yes">
 
23
HTTP/1.1 200 Followed here fine swsclose
 
24
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
25
Server: test-server/fake
 
26
Content-Length: 41
 
27
 
 
28
This second URL does not have a location
 
29
</data2>
 
30
</reply>
 
31
 
 
32
# Client-side
 
33
<client>
 
34
<server>
 
35
http
 
36
</server>
 
37
 <name>
 
38
HTTP no Location: on second URL 'redirect_url' check
 
39
 </name>
 
40
 <command>
 
41
http://%HOSTIP:%HTTPPORT/we/want/our/1081 http://%HOSTIP:%HTTPPORT/we/want/our/10810002 -w '%{redirect_url}\n'
 
42
</command>
 
43
</client>
 
44
 
 
45
# Verify data after the test has been "shot"
 
46
<verify>
 
47
<strip>
 
48
^User-Agent:.*
 
49
</strip>
 
50
<protocol>
 
51
GET /we/want/our/1081 HTTP/1.1
 
52
Host: %HOSTIP:%HTTPPORT
 
53
Accept: */*
 
54
 
 
55
GET /we/want/our/10810002 HTTP/1.1
 
56
Host: %HOSTIP:%HTTPPORT
 
57
Accept: */*
 
58
 
 
59
</protocol>
 
60
<stdout mode="text">
 
61
HTTP/1.1 301 This is a weirdo text message swsclose
 
62
Location: data/10810099.txt?coolsite=yes
 
63
Content-Length: 62
 
64
Connection: close
 
65
 
 
66
This server reply is for testing a simple Location: following
 
67
http://%HOSTIP:%HTTPPORT/we/want/our/data/10810099.txt?coolsite=yes
 
68
HTTP/1.1 200 Followed here fine swsclose
 
69
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
70
Server: test-server/fake
 
71
Content-Length: 41
 
72
 
 
73
This second URL does not have a location
 
74
 
 
75
</stdout>
 
76
</verify>
 
77
</testcase>