Mercurial > hg > nginx
annotate src/http/modules/perl/ngx_http_perl_module.h @ 4437:3a1507f48686 stable-1.0
Merge of r4372, r4373, r4374:
SCGI fixes:
*) Fixed incorrect use of r->http_version in scgi module.
The r->http_version is a version of client's request, and modules
must not set it unless they are really willing to downgrade protocol
version used for a response (i.e. to HTTP/0.9 if no response headers
are available). In neither case r->http_version may be upgraded.
The former code downgraded response from HTTP/1.1 to HTTP/1.0 for no
reason, causing various problems (see ticket #66). It was also
possible that HTTP/0.9 requests were upgraded to HTTP/1.0.
*) Removed duplicate function declaration.
*) Removed error if there is no Status header.
The SCGI specification doesn't specify format of the response, and
assuming CGI specs should be used there is no reason to complain.
RFC 3875 explicitly states that "A Status header field is optional,
and status 200 'OK' is assumed if it is omitted".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 05 Feb 2012 13:53:50 +0000 |
parents | b43f244d0430 |
children | d620f497c50f |
rev | line source |
---|---|
599 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_HTTP_PERL_MODULE_H_INCLUDED_ | |
8 #define _NGX_HTTP_PERL_MODULE_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 #include <ngx_http.h> | |
775 | 14 #include <nginx.h> |
599 | 15 |
16 #include <EXTERN.h> | |
17 #include <perl.h> | |
18 | |
19 | |
20 typedef ngx_http_request_t *nginx; | |
21 | |
22 typedef struct { | |
633 | 23 ngx_str_t filename; |
599 | 24 ngx_str_t redirect_uri; |
25 ngx_str_t redirect_args; | |
911 | 26 |
681 | 27 SV *next; |
28 | |
1897 | 29 ngx_uint_t done; /* unsigned done:1; */ |
599 | 30 |
912
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
31 ngx_array_t *variables; /* array of ngx_http_perl_var_t */ |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
32 |
617 | 33 #if (NGX_HTTP_SSI) |
599 | 34 ngx_http_ssi_ctx_t *ssi; |
617 | 35 #endif |
599 | 36 } ngx_http_perl_ctx_t; |
37 | |
38 | |
912
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
39 typedef struct { |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
40 ngx_uint_t hash; |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
41 ngx_str_t name; |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
42 ngx_str_t value; |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
43 } ngx_http_perl_var_t; |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
44 |
7fa926a7926d
$r->variable() supports perl only variables
Igor Sysoev <igor@sysoev.ru>
parents:
911
diff
changeset
|
45 |
599 | 46 extern ngx_module_t ngx_http_perl_module; |
47 | |
48 | |
49 /* | |
50 * workaround for "unused variable `Perl___notused'" warning | |
51 * when building with perl 5.6.1 | |
52 */ | |
53 #ifndef PERL_IMPLICIT_CONTEXT | |
54 #undef dTHXa | |
55 #define dTHXa(a) | |
56 #endif | |
57 | |
58 | |
868 | 59 extern void boot_DynaLoader(pTHX_ CV* cv); |
599 | 60 |
61 | |
681 | 62 void ngx_http_perl_handle_request(ngx_http_request_t *r); |
1897 | 63 void ngx_http_perl_sleep_handler(ngx_http_request_t *r); |
681 | 64 |
65 | |
599 | 66 #endif /* _NGX_HTTP_PERL_MODULE_H_INCLUDED_ */ |