annotate src/http/ngx_http_special_response.c @ 1592:128ea9efb824

server_tokens
author Igor Sysoev <igor@sysoev.ru>
date Mon, 22 Oct 2007 10:17:34 +0000
parents cc114c85be0f
children e27930ae2b8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
441
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 416
diff changeset
1
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 416
diff changeset
2 /*
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 441
diff changeset
3 * Copyright (C) Igor Sysoev
441
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 416
diff changeset
4 */
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 416
diff changeset
5
98
c9b243802a17 nginx-0.0.1-2003-05-30-18:27:59 import
Igor Sysoev <igor@sysoev.ru>
parents: 96
diff changeset
6
c9b243802a17 nginx-0.0.1-2003-05-30-18:27:59 import
Igor Sysoev <igor@sysoev.ru>
parents: 96
diff changeset
7 #include <ngx_config.h>
c9b243802a17 nginx-0.0.1-2003-05-30-18:27:59 import
Igor Sysoev <igor@sysoev.ru>
parents: 96
diff changeset
8 #include <ngx_core.h>
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
9 #include <ngx_http.h>
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
10 #include <nginx.h>
24
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12
1592
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
13 static u_char error_full_tail[] =
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
14 "<hr><center>" NGINX_VER "</center>" CRLF
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
15 "</body>" CRLF
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
16 "</html>" CRLF
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
17 ;
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
18
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
19
290
87e73f067470 nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents: 233
diff changeset
20 static u_char error_tail[] =
1592
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
21 "<hr><center>nginx</center>" CRLF
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
22 "</body>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
23 "</html>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
24 ;
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
25
59
e8cdc2989cee nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 47
diff changeset
26
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
27 static u_char ngx_http_msie_stub[] =
103
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
28 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
29 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
30 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
31 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
32 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
33 "<!-- The padding to disable MSIE's friendly error page -->" CRLF
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
34 ;
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
35
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
36
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
37 static u_char ngx_http_msie_refresh_head[] =
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
38 "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=";
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
39
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
40
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
41 static u_char ngx_http_msie_refresh_tail[] =
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
42 "\"></head><body></body></html>" CRLF;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
43
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
44
144
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
45 static char error_301_page[] =
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
46 "<html>" CRLF
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
47 "<head><title>301 Moved Permanently</title></head>" CRLF
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
48 "<body bgcolor=\"white\">" CRLF
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
49 "<center><h1>301 Moved Permanently</h1></center>" CRLF
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
50 ;
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
51
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
52
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
53 static char error_302_page[] =
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
54 "<html>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
55 "<head><title>302 Found</title></head>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
56 "<body bgcolor=\"white\">" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
57 "<center><h1>302 Found</h1></center>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
58 ;
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
59
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
60
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
61 static char error_400_page[] =
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
62 "<html>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
63 "<head><title>400 Bad Request</title></head>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
64 "<body bgcolor=\"white\">" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
65 "<center><h1>400 Bad Request</h1></center>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
66 ;
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
67
59
e8cdc2989cee nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 47
diff changeset
68
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
69 static char error_401_page[] =
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
70 "<html>" CRLF
503
b1648294f693 nginx-0.1.26-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 501
diff changeset
71 "<head><title>401 Authorization Required</title></head>" CRLF
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
72 "<body bgcolor=\"white\">" CRLF
503
b1648294f693 nginx-0.1.26-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 501
diff changeset
73 "<center><h1>401 Authorization Required</h1></center>" CRLF
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
74 ;
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
75
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
76
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
77 static char error_402_page[] =
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
78 "<html>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
79 "<head><title>402 Payment Required</title></head>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
80 "<body bgcolor=\"white\">" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
81 "<center><h1>402 Payment Required</h1></center>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
82 ;
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
83
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
84
45
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
85 static char error_403_page[] =
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
86 "<html>" CRLF
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
87 "<head><title>403 Forbidden</title></head>" CRLF
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
88 "<body bgcolor=\"white\">" CRLF
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
89 "<center><h1>403 Forbidden</h1></center>" CRLF
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
90 ;
f1ee46c036a4 nginx-0.0.1-2003-01-10-09:09:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 26
diff changeset
91
59
e8cdc2989cee nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 47
diff changeset
92
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
93 static char error_404_page[] =
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
94 "<html>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
95 "<head><title>404 Not Found</title></head>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
96 "<body bgcolor=\"white\">" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
97 "<center><h1>404 Not Found</h1></center>" CRLF
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
98 ;
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
99
59
e8cdc2989cee nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 47
diff changeset
100
96
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
101 static char error_405_page[] =
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
102 "<html>" CRLF
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
103 "<head><title>405 Not Allowed</title></head>" CRLF
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
104 "<body bgcolor=\"white\">" CRLF
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
105 "<center><h1>405 Not Allowed</h1></center>" CRLF
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
106 ;
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
107
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
108
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
109 static char error_406_page[] =
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
110 "<html>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
111 "<head><title>406 Not Acceptable</title></head>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
112 "<body bgcolor=\"white\">" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
113 "<center><h1>406 Not Acceptable</h1></center>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
114 ;
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
115
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
116
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
117 static char error_408_page[] =
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
118 "<html>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
119 "<head><title>408 Request Time-out</title></head>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
120 "<body bgcolor=\"white\">" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
121 "<center><h1>408 Request Time-out</h1></center>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
122 ;
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
123
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
124
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
125 static char error_409_page[] =
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
126 "<html>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
127 "<head><title>409 Conflict</title></head>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
128 "<body bgcolor=\"white\">" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
129 "<center><h1>409 Conflict</h1></center>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
130 ;
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
131
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
132
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
133 static char error_410_page[] =
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
134 "<html>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
135 "<head><title>410 Gone</title></head>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
136 "<body bgcolor=\"white\">" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
137 "<center><h1>410 Gone</h1></center>" CRLF
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
138 ;
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
139
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
140
581
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
141 static char error_411_page[] =
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
142 "<html>" CRLF
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
143 "<head><title>411 Length Required</title></head>" CRLF
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
144 "<body bgcolor=\"white\">" CRLF
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
145 "<center><h1>411 Length Required</h1></center>" CRLF
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
146 ;
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
147
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
148
1057
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
149 static char error_412_page[] =
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
150 "<html>" CRLF
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
151 "<head><title>412 Precondition Failed</title></head>" CRLF
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
152 "<body bgcolor=\"white\">" CRLF
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
153 "<center><h1>412 Precondition Failed</h1></center>" CRLF
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
154 ;
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
155
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
156
162
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
157 static char error_413_page[] =
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
158 "<html>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
159 "<head><title>413 Request Entity Too Large</title></head>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
160 "<body bgcolor=\"white\">" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
161 "<center><h1>413 Request Entity Too Large</h1></center>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
162 ;
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
163
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
164
67
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
165 static char error_414_page[] =
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
166 "<html>" CRLF
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
167 "<head><title>414 Request-URI Too Large</title></head>" CRLF
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
168 "<body bgcolor=\"white\">" CRLF
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
169 "<center><h1>414 Request-URI Too Large</h1></center>" CRLF
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
170 ;
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
171
5a7d1aaa1618 nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 59
diff changeset
172
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
173 static char error_415_page[] =
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
174 "<html>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
175 "<head><title>415 Unsupported Media Type</title></head>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
176 "<body bgcolor=\"white\">" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
177 "<center><h1>415 Unsupported Media Type</h1></center>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
178 ;
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
179
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
180
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
181 static char error_416_page[] =
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
182 "<html>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
183 "<head><title>416 Requested Range Not Satisfiable</title></head>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
184 "<body bgcolor=\"white\">" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
185 "<center><h1>416 Requested Range Not Satisfiable</h1></center>" CRLF
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
186 ;
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
187
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
188
647
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
189 static char error_495_page[] =
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
190 "<html>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
191 "<head><title>400 The SSL certificate error</title></head>"
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
192 CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
193 "<body bgcolor=\"white\">" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
194 "<center><h1>400 Bad Request</h1></center>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
195 "<center>The SSL certificate error</center>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
196 ;
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
197
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
198
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
199 static char error_496_page[] =
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
200 "<html>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
201 "<head><title>400 No required SSL certificate was sent</title></head>"
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
202 CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
203 "<body bgcolor=\"white\">" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
204 "<center><h1>400 Bad Request</h1></center>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
205 "<center>No required SSL certificate was sent</center>" CRLF
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
206 ;
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
207
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
208
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
209 static char error_497_page[] =
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
210 "<html>" CRLF
396
6f3b20c1ac50 nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 384
diff changeset
211 "<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>"
6f3b20c1ac50 nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 384
diff changeset
212 CRLF
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
213 "<body bgcolor=\"white\">" CRLF
396
6f3b20c1ac50 nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 384
diff changeset
214 "<center><h1>400 Bad Request</h1></center>" CRLF
6f3b20c1ac50 nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 384
diff changeset
215 "<center>The plain HTTP request was sent to HTTPS port</center>" CRLF
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
216 ;
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
217
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
218
47
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
219 static char error_500_page[] =
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
220 "<html>" CRLF
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
221 "<head><title>500 Internal Server Error</title></head>" CRLF
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
222 "<body bgcolor=\"white\">" CRLF
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
223 "<center><h1>500 Internal Server Error</h1></center>" CRLF
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
224 ;
d81326c3b21b nginx-0.0.1-2003-01-15-10:02:27 import
Igor Sysoev <igor@sysoev.ru>
parents: 45
diff changeset
225
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
226
233
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
227 static char error_501_page[] =
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
228 "<html>" CRLF
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
229 "<head><title>501 Method Not Implemented</title></head>" CRLF
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
230 "<body bgcolor=\"white\">" CRLF
535
563ad09abf50 nginx-0.1.42-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 527
diff changeset
231 "<center><h1>501 Method Not Implemented</h1></center>" CRLF
233
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
232 ;
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
233
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
234
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
235 static char error_502_page[] =
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
236 "<html>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
237 "<head><title>502 Bad Gateway</title></head>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
238 "<body bgcolor=\"white\">" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
239 "<center><h1>502 Bad Gateway</h1></center>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
240 ;
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
241
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
242
162
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
243 static char error_503_page[] =
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
244 "<html>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
245 "<head><title>503 Service Temporarily Unavailable</title></head>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
246 "<body bgcolor=\"white\">" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
247 "<center><h1>503 Service Temporarily Unavailable</h1></center>" CRLF
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
248 ;
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
249
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
250
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
251 static char error_504_page[] =
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
252 "<html>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
253 "<head><title>504 Gateway Time-out</title></head>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
254 "<body bgcolor=\"white\">" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
255 "<center><h1>504 Gateway Time-out</h1></center>" CRLF
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
256 ;
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
257
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
258
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
259 static char error_507_page[] =
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
260 "<html>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
261 "<head><title>507 Insufficient Storage</title></head>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
262 "<body bgcolor=\"white\">" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
263 "<center><h1>507 Insufficient Storage</h1></center>" CRLF
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
264 ;
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
265
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
266
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
267 static ngx_str_t error_pages[] = {
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
268
633
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
269 ngx_null_string, /* 201, 204 */
511
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
270
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
271 #define NGX_HTTP_LEVEL_200 1
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
272
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
273 /* ngx_null_string, */ /* 300 */
144
ef8c87afcfc5 nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents: 143
diff changeset
274 ngx_string(error_301_page),
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
275 ngx_string(error_302_page),
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
276 ngx_null_string, /* 303 */
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
277
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
278 #define NGX_HTTP_LEVEL_300 3
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
279
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
280 ngx_string(error_400_page),
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
281 ngx_string(error_401_page),
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
282 ngx_string(error_402_page),
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
283 ngx_string(error_403_page),
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
284 ngx_string(error_404_page),
96
a23d010f356d nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents: 88
diff changeset
285 ngx_string(error_405_page),
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
286 ngx_string(error_406_page),
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
287 ngx_null_string, /* 407 */
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
288 ngx_string(error_408_page),
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
289 ngx_string(error_409_page),
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
290 ngx_string(error_410_page),
581
326634fb9d47 nginx-0.3.12-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 577
diff changeset
291 ngx_string(error_411_page),
1057
bbde03037ef6 NGX_HTTP_PRECONDITION_FAILED
Igor Sysoev <igor@sysoev.ru>
parents: 730
diff changeset
292 ngx_string(error_412_page),
162
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
293 ngx_string(error_413_page),
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
294 ngx_string(error_414_page),
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
295 ngx_string(error_415_page),
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
296 ngx_string(error_416_page),
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
297
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
298 #define NGX_HTTP_LEVEL_400 17
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
299
647
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
300 ngx_string(error_495_page), /* 495, https certificate error */
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
301 ngx_string(error_496_page), /* 496, https no certificate */
396
6f3b20c1ac50 nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents: 384
diff changeset
302 ngx_string(error_497_page), /* 497, http to https */
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
303 ngx_string(error_404_page), /* 498, invalid host name */
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
304 ngx_null_string, /* 499, client had closed connection */
335
d4241d7787fe nginx-0.0.3-2004-05-14-20:51:47 import
Igor Sysoev <igor@sysoev.ru>
parents: 331
diff changeset
305
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
306 ngx_string(error_500_page),
233
4eaafcd57be7 nginx-0.0.1-2004-01-19-21:09:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 179
diff changeset
307 ngx_string(error_501_page),
69
e43f406e4525 nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 68
diff changeset
308 ngx_string(error_502_page),
162
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
309 ngx_string(error_503_page),
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
310 ngx_string(error_504_page),
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
311 ngx_null_string, /* 505 */
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
312 ngx_null_string, /* 506 */
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
313 ngx_string(error_507_page)
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
314 };
24
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
315
59
e8cdc2989cee nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 47
diff changeset
316
717
08652aae6fab fix msvc build failure introduced by previous commit
Igor Sysoev <igor@sysoev.ru>
parents: 716
diff changeset
317 static ngx_str_t ngx_http_get_name = { 3, (u_char *) "GET " };
716
d8d7c39e3a76 allowing handling 400 errors via proxy_pass
Igor Sysoev <igor@sysoev.ru>
parents: 681
diff changeset
318
d8d7c39e3a76 allowing handling 400 errors via proxy_pass
Igor Sysoev <igor@sysoev.ru>
parents: 681
diff changeset
319
487
31ff3e943e16 nginx-0.1.18-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 477
diff changeset
320 ngx_int_t
31ff3e943e16 nginx-0.1.18-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 477
diff changeset
321 ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
24
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
322 {
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
323 u_char *p;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
324 size_t msie_refresh;
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
325 uintptr_t escape;
290
87e73f067470 nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents: 233
diff changeset
326 ngx_int_t rc;
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
327 ngx_buf_t *b;
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
328 ngx_str_t *uri, *location;
681
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
329 ngx_uint_t i, n, err, msie_padding;
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
330 ngx_chain_t *out, *cl;
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
331 ngx_http_err_page_t *err_page;
158
d377ee423603 nginx-0.0.1-2003-10-24-10:53:41 import
Igor Sysoev <igor@sysoev.ru>
parents: 155
diff changeset
332 ngx_http_core_loc_conf_t *clcf;
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
333
527
7fa11e5c6e96 nginx-0.1.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 513
diff changeset
334 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
7fa11e5c6e96 nginx-0.1.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 513
diff changeset
335 "http special response: %d, \"%V\"", error, &r->uri);
7fa11e5c6e96 nginx-0.1.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 513
diff changeset
336
1370
cc114c85be0f rename ngx_http_discard_body() to ngx_http_discard_request_body()
Igor Sysoev <igor@sysoev.ru>
parents: 1353
diff changeset
337 rc = ngx_http_discard_request_body(r);
161
88abd07d9f62 nginx-0.0.1-2003-10-27-19:16:17 import
Igor Sysoev <igor@sysoev.ru>
parents: 158
diff changeset
338
294
5cfd65b8b0a7 nginx-0.0.3-2004-03-23-09:01:52 import
Igor Sysoev <igor@sysoev.ru>
parents: 293
diff changeset
339 if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
5cfd65b8b0a7 nginx-0.0.3-2004-03-23-09:01:52 import
Igor Sysoev <igor@sysoev.ru>
parents: 293
diff changeset
340 error = NGX_HTTP_INTERNAL_SERVER_ERROR;
161
88abd07d9f62 nginx-0.0.1-2003-10-27-19:16:17 import
Igor Sysoev <igor@sysoev.ru>
parents: 158
diff changeset
341 }
88abd07d9f62 nginx-0.0.1-2003-10-27-19:16:17 import
Igor Sysoev <igor@sysoev.ru>
parents: 158
diff changeset
342
677
921a7ce4baf4 nginx-0.3.60-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 675
diff changeset
343 r->err_status = error;
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
344
68
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
345 if (r->keepalive != 0) {
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
346 switch (error) {
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
347 case NGX_HTTP_BAD_REQUEST:
162
96993d4d5067 nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 161
diff changeset
348 case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE:
68
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
349 case NGX_HTTP_REQUEST_URI_TOO_LARGE:
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
350 case NGX_HTTP_TO_HTTPS:
647
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
351 case NGX_HTTPS_CERT_ERROR:
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
352 case NGX_HTTPS_NO_CERT:
68
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
353 case NGX_HTTP_INTERNAL_SERVER_ERROR:
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
354 r->keepalive = 0;
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
355 }
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
356 }
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
357
88
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
358 if (r->lingering_close == 1) {
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
359 switch (error) {
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
360 case NGX_HTTP_BAD_REQUEST:
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
361 case NGX_HTTP_TO_HTTPS:
647
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
362 case NGX_HTTPS_CERT_ERROR:
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
363 case NGX_HTTPS_NO_CERT:
88
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
364 r->lingering_close = 0;
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
365 }
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
366 }
674d333f4296 nginx-0.0.1-2003-05-14-21:13:13 import
Igor Sysoev <igor@sysoev.ru>
parents: 71
diff changeset
367
675
e924670896ab nginx-0.3.59-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 673
diff changeset
368 r->headers_out.content_type.len = 0;
e924670896ab nginx-0.3.59-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 673
diff changeset
369
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
370 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
371
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
372 if (!r->error_page && clcf->error_pages) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
373
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
374 if (clcf->recursive_error_pages == 0) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
375 r->error_page = 1;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
376 }
477
ad1e9ebf93bb nginx-0.1.13-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
377
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
378 err_page = clcf->error_pages->elts;
477
ad1e9ebf93bb nginx-0.1.13-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
379
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
380 for (i = 0; i < clcf->error_pages->nelts; i++) {
477
ad1e9ebf93bb nginx-0.1.13-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
381
326
8733703a37f3 nginx-0.0.3-2004-04-26-00:13:21 import
Igor Sysoev <igor@sysoev.ru>
parents: 323
diff changeset
382 if (err_page[i].status == error) {
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
383 r->err_status = err_page[i].overwrite;
477
ad1e9ebf93bb nginx-0.1.13-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
384
539
371c1cee100d nginx-0.1.44-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 535
diff changeset
385 r->method = NGX_HTTP_GET;
716
d8d7c39e3a76 allowing handling 400 errors via proxy_pass
Igor Sysoev <igor@sysoev.ru>
parents: 681
diff changeset
386 r->method_name = ngx_http_get_name;
539
371c1cee100d nginx-0.1.44-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 535
diff changeset
387
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
388 uri = &err_page[i].uri;
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
389
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
390 if (err_page[i].uri_lengths) {
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
391 if (ngx_http_script_run(r, uri,
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
392 err_page[i].uri_lengths->elts, 0,
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
393 err_page[i].uri_values->elts)
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
394 == NULL)
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
395 {
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
396 return NGX_ERROR;
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
397 }
681
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
398
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
399 if (r->zero_in_uri) {
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
400 for (n = 0; n < uri->len; n++) {
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
401 if (uri->data[n] == '\0') {
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
402 goto zero;
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
403 }
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
404 }
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
405
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
406 r->zero_in_uri = 0;
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
407 }
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
408
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
409 } else {
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
410 r->zero_in_uri = 0;
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
411 }
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
412
681
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
413 zero:
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 679
diff changeset
414
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
415 if (uri->data[0] == '/') {
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
416 return ngx_http_internal_redirect(r, uri, NULL);
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
417 }
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
418
1353
7443fbe0b013 named location
Igor Sysoev <igor@sysoev.ru>
parents: 1298
diff changeset
419 if (uri->data[0] == '@') {
7443fbe0b013 named location
Igor Sysoev <igor@sysoev.ru>
parents: 1298
diff changeset
420 return ngx_http_named_location(r, uri);
7443fbe0b013 named location
Igor Sysoev <igor@sysoev.ru>
parents: 1298
diff changeset
421 }
7443fbe0b013 named location
Igor Sysoev <igor@sysoev.ru>
parents: 1298
diff changeset
422
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
423 r->headers_out.location =
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
424 ngx_list_push(&r->headers_out.headers);
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
425
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
426 if (r->headers_out.location) {
675
e924670896ab nginx-0.3.59-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 673
diff changeset
427 error = NGX_HTTP_MOVED_TEMPORARILY;
e924670896ab nginx-0.3.59-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 673
diff changeset
428
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
429 r->err_status = NGX_HTTP_MOVED_TEMPORARILY;
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
430
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
431 r->headers_out.location->hash = 1;
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
432 r->headers_out.location->key.len = sizeof("Location") - 1;
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
433 r->headers_out.location->key.data = (u_char *) "Location";
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
434 r->headers_out.location->value = *uri;
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
435
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
436 } else {
673
b80f94fa2197 nginx-0.3.58-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 647
diff changeset
437 return NGX_ERROR;
555
7bd37aef1e7e nginx-0.2.6-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 553
diff changeset
438 }
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
439 }
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
440 }
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
441 }
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
442
633
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
443 if (error == NGX_HTTP_CREATED) {
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
444 /* 201 */
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
445 err = 0;
637
e60fe4cf1d4e nginx-0.3.40-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 633
diff changeset
446 r->header_only = 1;
633
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
447
f971949ffb58 nginx-0.3.38-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 613
diff changeset
448 } else if (error == NGX_HTTP_NO_CONTENT) {
511
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
449 /* 204 */
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
450 err = 0;
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
451
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
452 } else if (error < NGX_HTTP_BAD_REQUEST) {
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
453 /* 3XX */
513
fbbf16224844 nginx-0.1.31-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 511
diff changeset
454 err = error - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_LEVEL_200;
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
455
587
284cc140593b nginx-0.3.15-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 581
diff changeset
456 } else if (error < NGX_HTTP_OWN_CODES) {
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
457 /* 4XX */
511
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
458 err = error - NGX_HTTP_BAD_REQUEST + NGX_HTTP_LEVEL_200
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
459 + NGX_HTTP_LEVEL_300;
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
460
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
461 } else {
335
d4241d7787fe nginx-0.0.3-2004-05-14-20:51:47 import
Igor Sysoev <igor@sysoev.ru>
parents: 331
diff changeset
462 /* 49X, 5XX */
587
284cc140593b nginx-0.3.15-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 581
diff changeset
463 err = error - NGX_HTTP_OWN_CODES + NGX_HTTP_LEVEL_200
511
c12967aadd87 nginx-0.1.30-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
464 + NGX_HTTP_LEVEL_300
499
64d9afb209da nginx-0.1.24-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
465 + NGX_HTTP_LEVEL_400;
335
d4241d7787fe nginx-0.0.3-2004-05-14-20:51:47 import
Igor Sysoev <igor@sysoev.ru>
parents: 331
diff changeset
466 switch (error) {
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
467 case NGX_HTTP_TO_HTTPS:
647
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
468 case NGX_HTTPS_CERT_ERROR:
95d7da23ea53 nginx-0.3.45-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 637
diff changeset
469 case NGX_HTTPS_NO_CERT:
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
470 r->err_status = NGX_HTTP_BAD_REQUEST;
384
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
471 error = NGX_HTTP_BAD_REQUEST;
e7054aaedf68 nginx-0.0.7-2004-07-09-11:12:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 356
diff changeset
472 break;
335
d4241d7787fe nginx-0.0.3-2004-05-14-20:51:47 import
Igor Sysoev <igor@sysoev.ru>
parents: 331
diff changeset
473 }
176
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
474 }
c0552e5ab567 nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents: 165
diff changeset
475
356
2e3cbc1bbe3c nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents: 343
diff changeset
476 msie_padding = 0;
2e3cbc1bbe3c nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents: 343
diff changeset
477
730
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
478 if (!r->zero_body) {
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
479 if (error_pages[err].len) {
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
480 r->headers_out.content_length_n = error_pages[err].len
1592
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
481 + (clcf->server_tokens ? sizeof(error_full_tail) - 1:
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
482 sizeof(error_tail) - 1);
331
f168a88e93f7 nginx-0.0.3-2004-05-04-21:56:58 import
Igor Sysoev <igor@sysoev.ru>
parents: 326
diff changeset
483
730
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
484 if (clcf->msie_padding
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
485 && r->headers_in.msie
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
486 && r->http_version >= NGX_HTTP_VERSION_10
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
487 && error >= NGX_HTTP_BAD_REQUEST
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
488 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE)
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
489 {
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
490 r->headers_out.content_length_n +=
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
491 sizeof(ngx_http_msie_stub) - 1;
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
492 msie_padding = 1;
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
493 }
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
494
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
495 r->headers_out.content_type.len = sizeof("text/html") - 1;
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
496 r->headers_out.content_type.data = (u_char *) "text/html";
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
497
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
498 } else {
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
499 r->headers_out.content_length_n = -1;
331
f168a88e93f7 nginx-0.0.3-2004-05-04-21:56:58 import
Igor Sysoev <igor@sysoev.ru>
parents: 326
diff changeset
500 }
99
a059e1aa65d4 nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents: 98
diff changeset
501
68
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
502 } else {
730
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
503 r->headers_out.content_length_n = 0;
1be87cdd010f set "Content-Length: 0" for errors handled by "return 204"
Igor Sysoev <igor@sysoev.ru>
parents: 717
diff changeset
504 err = 0;
165
894a01c6aea3 nginx-0.0.1-2003-10-29-20:39:05 import
Igor Sysoev <igor@sysoev.ru>
parents: 164
diff changeset
505 }
894a01c6aea3 nginx-0.0.1-2003-10-29-20:39:05 import
Igor Sysoev <igor@sysoev.ru>
parents: 164
diff changeset
506
894a01c6aea3 nginx-0.0.1-2003-10-29-20:39:05 import
Igor Sysoev <igor@sysoev.ru>
parents: 164
diff changeset
507 if (r->headers_out.content_length) {
509
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
508 r->headers_out.content_length->hash = 0;
153
c71aeb75c071 nginx-0.0.1-2003-10-21-20:49:56 import
Igor Sysoev <igor@sysoev.ru>
parents: 148
diff changeset
509 r->headers_out.content_length = NULL;
68
d549fdc17d7e nginx-0.0.1-2003-03-12-20:32:22 import
Igor Sysoev <igor@sysoev.ru>
parents: 67
diff changeset
510 }
24
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
511
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
512 if (clcf->msie_refresh
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
513 && r->headers_in.msie
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
514 && (error == NGX_HTTP_MOVED_PERMANENTLY
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
515 || error == NGX_HTTP_MOVED_TEMPORARILY))
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
516 {
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
517
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
518 location = &r->headers_out.location->value;
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
519
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
520 escape = 2 * ngx_escape_uri(NULL, location->data, location->len,
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
521 NGX_ESCAPE_REFRESH);
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
522
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
523 msie_refresh = sizeof(ngx_http_msie_refresh_head) - 1
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
524 + escape + location->len
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
525 + sizeof(ngx_http_msie_refresh_tail) - 1;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
526
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
527 r->err_status = NGX_HTTP_OK;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
528 r->headers_out.content_type_len = sizeof("text/html") - 1;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
529 r->headers_out.content_length_n = msie_refresh;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
530 r->headers_out.location->hash = 0;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
531 r->headers_out.location = NULL;
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
532
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
533 } else {
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
534 location = NULL;
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
535 escape = 0;
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
536 msie_refresh = 0;
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
537 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
538
577
4d9ea73a627a nginx-0.3.10-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 555
diff changeset
539 ngx_http_clear_accept_ranges(r);
4d9ea73a627a nginx-0.3.10-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 555
diff changeset
540 ngx_http_clear_last_modified(r);
4d9ea73a627a nginx-0.3.10-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 555
diff changeset
541
103
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
542 rc = ngx_http_send_header(r);
142
cb77c084acdb nginx-0.0.1-2003-10-09-11:00:45 import
Igor Sysoev <igor@sysoev.ru>
parents: 103
diff changeset
543
143
5526213be452 nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents: 142
diff changeset
544 if (rc == NGX_ERROR || r->header_only) {
5526213be452 nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents: 142
diff changeset
545 return rc;
103
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
546 }
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
547
26
53cb81681040 nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 24
diff changeset
548
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
549 if (msie_refresh == 0) {
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
550
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
551 if (error_pages[err].len == 0) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
552 return NGX_OK;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
553 }
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
554
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
555 b = ngx_calloc_buf(r->pool);
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
556 if (b == NULL) {
164
84036764e215 nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 162
diff changeset
557 return NGX_ERROR;
84036764e215 nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents: 162
diff changeset
558 }
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
559
343
6bdf858bff8c nginx-0.0.3-2004-05-28-19:49:23 import; rename ngx_hunk_t to ngx_buf_t
Igor Sysoev <igor@sysoev.ru>
parents: 335
diff changeset
560 b->memory = 1;
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
561 b->pos = error_pages[err].data;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
562 b->last = error_pages[err].data + error_pages[err].len;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
563
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
564 cl = ngx_alloc_chain_link(r->pool);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
565 if (cl == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
566 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
567 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
568
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
569 cl->buf = b;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
570 out = cl;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
571
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
572
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
573 b = ngx_calloc_buf(r->pool);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
574 if (b == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
575 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
576 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
577
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
578 b->memory = 1;
1592
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
579
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
580 if (clcf->server_tokens) {
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
581 b->pos = error_full_tail;
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
582 b->last = error_full_tail + sizeof(error_full_tail) - 1;
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
583 } else {
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
584 b->pos = error_tail;
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
585 b->last = error_tail + sizeof(error_tail) - 1;
128ea9efb824 server_tokens
Igor Sysoev <igor@sysoev.ru>
parents: 1370
diff changeset
586 }
153
c71aeb75c071 nginx-0.0.1-2003-10-21-20:49:56 import
Igor Sysoev <igor@sysoev.ru>
parents: 148
diff changeset
587
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
588 cl->next = ngx_alloc_chain_link(r->pool);
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
589 if (cl->next == NULL) {
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
590 return NGX_ERROR;
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
591 }
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
592
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
593 cl = cl->next;
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
594 cl->buf = b;
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
595
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
596 if (msie_padding) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
597 b = ngx_calloc_buf(r->pool);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
598 if (b == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
599 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
600 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
601
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
602 b->memory = 1;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
603 b->pos = ngx_http_msie_stub;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
604 b->last = ngx_http_msie_stub + sizeof(ngx_http_msie_stub) - 1;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
605
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
606 cl->next = ngx_alloc_chain_link(r->pool);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
607 if (cl->next == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
608 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
609 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
610
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
611 cl = cl->next;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
612 cl->buf = b;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
613 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
614
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
615 } else {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
616 b = ngx_create_temp_buf(r->pool, msie_refresh);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
617 if (b == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
618 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
619 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
620
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
621 p = ngx_cpymem(b->pos, ngx_http_msie_refresh_head,
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
622 sizeof(ngx_http_msie_refresh_head) - 1);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
623
1298
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
624 if (escape == 0) {
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
625 p = ngx_cpymem(p, location->data, location->len);
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
626
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
627 } else {
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
628 p = (u_char *) ngx_escape_uri(p, location->data, location->len,
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
629 NGX_ESCAPE_REFRESH);
458e041fc902 msie_refresh should escape at least '"' to prevent XSS
Igor Sysoev <igor@sysoev.ru>
parents: 1057
diff changeset
630 }
679
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
631
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
632 b->last = ngx_cpymem(p, ngx_http_msie_refresh_tail,
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
633 sizeof(ngx_http_msie_refresh_tail) - 1);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
634
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
635 cl = ngx_alloc_chain_link(r->pool);
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
636 if (cl == NULL) {
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
637 return NGX_ERROR;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
638 }
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
639
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
640 cl->buf = b;
df95dcff753a nginx-0.3.61-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 677
diff changeset
641 out = cl;
103
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
642 }
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
643
597
9262f520ce21 nginx-0.3.20-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 587
diff changeset
644 if (r == r->main) {
509
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
645 b->last_buf = 1;
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
646 }
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
647
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
648 b->last_in_chain = 1;
103
6dfda4cf5200 nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents: 99
diff changeset
649
501
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
650 cl->next = NULL;
d4ea69372b94 nginx-0.1.25-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 499
diff changeset
651
153
c71aeb75c071 nginx-0.0.1-2003-10-21-20:49:56 import
Igor Sysoev <igor@sysoev.ru>
parents: 148
diff changeset
652 return ngx_http_output_filter(r, out);
24
77c7629a2627 nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
653 }