@@ -33,14 +33,15 @@ __DATA__
33
33
=== TEST 1: the http_check test-single server
34
34
--- http_config
35
35
upstream test{
36
- server blog.163 .com:80;
36
+ server www.taobao .com:80;
37
37
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
38
38
check_http_send "GET / HTTP/1.0\r\n\r\n";
39
39
check_http_expect_alive http_2xx http_3xx;
40
40
}
41
41
42
42
--- config
43
43
location / {
44
+ proxy_set_header host www.taobao.com;
44
45
proxy_pass http://test;
45
46
}
46
47
51
52
=== TEST 2: the http_check test-multi_server
52
53
--- http_config
53
54
upstream test{
54
- server blog.163 .com:80;
55
- server blog.163 .com:81;
55
+ server www.taobao .com:80;
56
+ server www.taobao .com:81;
56
57
57
58
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
58
59
check_http_send "GET / HTTP/1.0\r\n\r\n";
70
71
71
72
--- config
72
73
location / {
74
+ proxy_set_header host www.taobao.com;
73
75
proxy_pass http://test;
74
76
}
75
77
@@ -80,16 +82,17 @@ GET /
80
82
=== TEST 3: the http_check test
81
83
--- http_config
82
84
upstream test{
83
- server blog.163 .com:80;
84
- server blog.163 .com:81;
85
+ server www.taobao .com:80;
86
+ server www.taobao .com:81;
85
87
86
88
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
87
89
check_http_send "GET /foo HTTP/1.0\r\n\r\n";
88
- check_http_expect_alive http_2xx http_3xx ;
90
+ check_http_expect_alive http_2xx;
89
91
}
90
92
91
93
--- config
92
94
location / {
95
+ proxy_set_header host www.taobao.com;
93
96
proxy_pass http://test;
94
97
}
95
98
@@ -101,12 +104,13 @@ GET /
101
104
=== TEST 4: the http_check without check directive
102
105
--- http_config
103
106
upstream test{
104
- server blog.163 .com:80;
105
- server blog.163 .com:81;
107
+ server www.taobao .com:80;
108
+ server www.taobao .com:81;
106
109
}
107
110
108
111
--- config
109
112
location / {
113
+ proxy_set_header host www.taobao.com;
110
114
proxy_pass http://test;
111
115
}
112
116
@@ -117,8 +121,8 @@ GET /
117
121
=== TEST 5: the http_check which does not use the upstream
118
122
--- http_config
119
123
upstream test{
120
- server blog.163 .com:80;
121
- server blog.163 .com:81;
124
+ server www.taobao .com:80;
125
+ server www.taobao .com:81;
122
126
123
127
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
124
128
check_http_send "GET / HTTP/1.0\r\n\r\n";
@@ -127,7 +131,8 @@ GET /
127
131
128
132
--- config
129
133
location / {
130
- proxy_pass http://blog.163.com;
134
+ proxy_set_header host www.taobao.com;
135
+ proxy_pass http://www.taobao.com;
131
136
}
132
137
133
138
--- request
@@ -137,7 +142,7 @@ GET /
137
142
=== TEST 6: the http_check test-single server
138
143
--- http_config
139
144
upstream test{
140
- server blog.163 .com:80;
145
+ server www.taobao .com:80;
141
146
ip_hash;
142
147
143
148
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -147,6 +152,7 @@ GET /
147
152
148
153
--- config
149
154
location / {
155
+ proxy_set_header host www.taobao.com;
150
156
proxy_pass http://test;
151
157
}
152
158
@@ -157,8 +163,8 @@ GET /
157
163
=== TEST 7: the http_check test-multi_server
158
164
--- http_config
159
165
upstream test{
160
- server blog.163 .com:80;
161
- server blog.163 .com:81;
166
+ server www.taobao .com:80;
167
+ server www.taobao .com:81;
162
168
ip_hash;
163
169
164
170
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -168,6 +174,7 @@ GET /
168
174
169
175
--- config
170
176
location / {
177
+ proxy_set_header host www.taobao.com;
171
178
proxy_pass http://test;
172
179
}
173
180
@@ -178,17 +185,18 @@ GET /
178
185
=== TEST 8: the http_check test
179
186
--- http_config
180
187
upstream test{
181
- server blog.163 .com:80;
182
- server blog.163 .com:81;
188
+ server www.taobao .com:80;
189
+ server www.taobao .com:81;
183
190
ip_hash;
184
191
185
192
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
186
193
check_http_send "GET /foo HTTP/1.0\r\n\r\n";
187
- check_http_expect_alive http_2xx http_3xx ;
194
+ check_http_expect_alive http_2xx;
188
195
}
189
196
190
197
--- config
191
198
location / {
199
+ proxy_set_header host www.taobao.com;
192
200
proxy_pass http://test;
193
201
}
194
202
@@ -200,13 +208,14 @@ GET /
200
208
=== TEST 9: the http_check without check directive
201
209
--- http_config
202
210
upstream test{
203
- server blog.163 .com:80;
204
- server blog.163 .com:81;
211
+ server www.taobao .com:80;
212
+ server www.taobao .com:81;
205
213
ip_hash;
206
214
}
207
215
208
216
--- config
209
217
location / {
218
+ proxy_set_header host www.taobao.com;
210
219
proxy_pass http://test;
211
220
}
212
221
@@ -217,8 +226,8 @@ GET /
217
226
=== TEST 10: the http_check which does not use the upstream
218
227
--- http_config
219
228
upstream test{
220
- server blog.163 .com:80;
221
- server blog.163 .com:81;
229
+ server www.taobao .com:80;
230
+ server www.taobao .com:81;
222
231
ip_hash;
223
232
224
233
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -228,7 +237,8 @@ GET /
228
237
229
238
--- config
230
239
location / {
231
- proxy_pass http://blog.163.com;
240
+ proxy_set_header host www.taobao.com;
241
+ proxy_pass http://www.taobao.com;
232
242
}
233
243
234
244
--- request
@@ -238,8 +248,8 @@ GET /
238
248
=== TEST 11: the http_check which does not use the upstream, with variable
239
249
--- http_config
240
250
upstream test{
241
- server blog.163 .com:80;
242
- server blog.163 .com:81;
251
+ server www.taobao .com:80;
252
+ server www.taobao .com:81;
243
253
ip_hash;
244
254
245
255
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -252,7 +262,8 @@ GET /
252
262
--- config
253
263
location / {
254
264
set $test "/";
255
- proxy_pass http://blog.163.com$test;
265
+ proxy_set_header host www.taobao.com;
266
+ proxy_pass http://www.taobao.com$test;
256
267
}
257
268
258
269
--- request
@@ -264,7 +275,7 @@ GET /
264
275
2: < 1.2.2
265
276
--- http_config
266
277
upstream test{
267
- server blog.163 .com:80;
278
+ server www.taobao .com:80;
268
279
least_conn;
269
280
270
281
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -274,6 +285,7 @@ GET /
274
285
275
286
--- config
276
287
location / {
288
+ proxy_set_header host www.taobao.com;
277
289
proxy_pass http://test;
278
290
}
279
291
@@ -286,8 +298,8 @@ GET /
286
298
2: < 1.2.2
287
299
--- http_config
288
300
upstream test{
289
- server blog.163 .com:80;
290
- server blog.163 .com:81;
301
+ server www.taobao .com:80;
302
+ server www.taobao .com:81;
291
303
least_conn;
292
304
293
305
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
@@ -297,6 +309,7 @@ GET /
297
309
298
310
--- config
299
311
location / {
312
+ proxy_set_header host www.taobao.com;
300
313
proxy_pass http://test;
301
314
}
302
315
@@ -309,17 +322,18 @@ GET /
309
322
2: < 1.2.2
310
323
--- http_config
311
324
upstream test{
312
- server blog.163 .com:80;
313
- server blog.163 .com:81;
325
+ server www.taobao .com:80;
326
+ server www.taobao .com:81;
314
327
least_conn;
315
328
316
329
check interval=3000 rise=1 fall=5 timeout=2000 type=http;
317
330
check_http_send "GET /foo HTTP/1.0\r\n\r\n";
318
- check_http_expect_alive http_2xx http_3xx ;
331
+ check_http_expect_alive http_2xx;
319
332
}
320
333
321
334
--- config
322
335
location / {
336
+ proxy_set_header host www.taobao.com;
323
337
proxy_pass http://test;
324
338
}
325
339
@@ -333,13 +347,14 @@ GET /
333
347
2: < 1.2.2
334
348
--- http_config
335
349
upstream test{
336
- server blog.163 .com:80;
337
- server blog.163 .com:81;
350
+ server www.taobao .com:80;
351
+ server www.taobao .com:81;
338
352
least_conn;
339
353
}
340
354
341
355
--- config
342
356
location / {
357
+ proxy_set_header host www.taobao.com;
343
358
proxy_pass http://test;
344
359
}
345
360
0 commit comments