Mercurial > hg > nginx-quic
annotate src/http/modules/perl/nginx.pm @ 4324:b8c01edadbc6
Version bump.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 06 Dec 2011 13:22:32 +0000 |
parents | f85bd7c35c77 |
children | 88aa90a198dd |
rev | line source |
---|---|
599 | 1 package nginx; |
2 | |
3 use 5.006001; | |
4 use strict; | |
5 use warnings; | |
6 | |
7 require Exporter; | |
8 | |
9 our @ISA = qw(Exporter); | |
10 | |
11 our @EXPORT = qw( | |
12 OK | |
13 DECLINED | |
914 | 14 |
599 | 15 HTTP_OK |
914 | 16 HTTP_CREATED |
3604 | 17 HTTP_ACCEPTED |
914 | 18 HTTP_NO_CONTENT |
19 HTTP_PARTIAL_CONTENT | |
20 | |
21 HTTP_MOVED_PERMANENTLY | |
22 HTTP_MOVED_TEMPORARILY | |
599 | 23 HTTP_REDIRECT |
914 | 24 HTTP_NOT_MODIFIED |
25 | |
26 HTTP_BAD_REQUEST | |
27 HTTP_UNAUTHORIZED | |
28 HTTP_PAYMENT_REQUIRED | |
29 HTTP_FORBIDDEN | |
599 | 30 HTTP_NOT_FOUND |
914 | 31 HTTP_NOT_ALLOWED |
32 HTTP_NOT_ACCEPTABLE | |
33 HTTP_REQUEST_TIME_OUT | |
34 HTTP_CONFLICT | |
35 HTTP_GONE | |
36 HTTP_LENGTH_REQUIRED | |
37 HTTP_REQUEST_ENTITY_TOO_LARGE | |
38 HTTP_REQUEST_URI_TOO_LARGE | |
39 HTTP_UNSUPPORTED_MEDIA_TYPE | |
40 HTTP_RANGE_NOT_SATISFIABLE | |
41 | |
42 HTTP_INTERNAL_SERVER_ERROR | |
599 | 43 HTTP_SERVER_ERROR |
914 | 44 HTTP_NOT_IMPLEMENTED |
45 HTTP_BAD_GATEWAY | |
46 HTTP_SERVICE_UNAVAILABLE | |
47 HTTP_GATEWAY_TIME_OUT | |
48 HTTP_INSUFFICIENT_STORAGE | |
599 | 49 ); |
50 | |
4324 | 51 our $VERSION = '1.1.11'; |
599 | 52 |
53 require XSLoader; | |
54 XSLoader::load('nginx', $VERSION); | |
55 | |
56 # Preloaded methods go here. | |
57 | |
914 | 58 use constant OK => 0; |
59 use constant DECLINED => -5; | |
60 | |
61 use constant HTTP_OK => 200; | |
62 use constant HTTP_CREATED => 201; | |
3604 | 63 use constant HTTP_ACCEPTED => 202; |
914 | 64 use constant HTTP_NO_CONTENT => 204; |
65 use constant HTTP_PARTIAL_CONTENT => 206; | |
66 | |
67 use constant HTTP_MOVED_PERMANENTLY => 301; | |
68 use constant HTTP_MOVED_TEMPORARILY => 302; | |
69 use constant HTTP_REDIRECT => 302; | |
70 use constant HTTP_NOT_MODIFIED => 304; | |
599 | 71 |
914 | 72 use constant HTTP_BAD_REQUEST => 400; |
73 use constant HTTP_UNAUTHORIZED => 401; | |
74 use constant HTTP_PAYMENT_REQUIRED => 402; | |
75 use constant HTTP_FORBIDDEN => 403; | |
76 use constant HTTP_NOT_FOUND => 404; | |
77 use constant HTTP_NOT_ALLOWED => 405; | |
78 use constant HTTP_NOT_ACCEPTABLE => 406; | |
79 use constant HTTP_REQUEST_TIME_OUT => 408; | |
80 use constant HTTP_CONFLICT => 409; | |
81 use constant HTTP_GONE => 410; | |
82 use constant HTTP_LENGTH_REQUIRED => 411; | |
83 use constant HTTP_REQUEST_ENTITY_TOO_LARGE => 413; | |
84 use constant HTTP_REQUEST_URI_TOO_LARGE => 414; | |
85 use constant HTTP_UNSUPPORTED_MEDIA_TYPE => 415; | |
86 use constant HTTP_RANGE_NOT_SATISFIABLE => 416; | |
87 | |
88 use constant HTTP_INTERNAL_SERVER_ERROR => 500; | |
89 use constant HTTP_SERVER_ERROR => 500; | |
90 use constant HTTP_NOT_IMPLEMENTED => 501; | |
91 use constant HTTP_BAD_GATEWAY => 502; | |
92 use constant HTTP_SERVICE_UNAVAILABLE => 503; | |
93 use constant HTTP_GATEWAY_TIME_OUT => 504; | |
94 use constant HTTP_INSUFFICIENT_STORAGE => 507; | |
599 | 95 |
96 | |
1178
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
97 sub rflush { |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
98 my $r = shift; |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
99 |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
100 $r->flush; |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
101 } |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
102 |
a77f6980de50
rename $r->rflush to $r->flush
Igor Sysoev <igor@sysoev.ru>
parents:
1177
diff
changeset
|
103 |
599 | 104 1; |
105 __END__ | |
106 | |
107 =head1 NAME | |
108 | |
109 nginx - Perl interface to the nginx HTTP server API | |
110 | |
111 =head1 SYNOPSIS | |
112 | |
113 use nginx; | |
114 | |
115 =head1 DESCRIPTION | |
116 | |
117 This module provides a Perl interface to the nginx HTTP server API. | |
118 | |
119 | |
120 =head1 SEE ALSO | |
121 | |
122 http://sysoev.ru/nginx/docs/http/ngx_http_perl_module.html | |
123 | |
124 =head1 AUTHOR | |
125 | |
126 Igor Sysoev | |
127 | |
128 =head1 COPYRIGHT AND LICENSE | |
129 | |
130 Copyright (C) Igor Sysoev | |
131 | |
132 | |
133 =cut |