Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (49 sloc) 2.481 kB
f9641b1 @miyagawa move extensions to PSGI::Extentions
miyagawa authored
1 =head1 NAME
2
426ef61 @karenetheridge fix typo s/extention/extension/
karenetheridge authored
3 PSGI::Extensions - PSGI extensions
f9641b1 @miyagawa move extensions to PSGI::Extentions
miyagawa authored
4
5 =head1 SPECIFICATION
6
7 The PSGI environment B<MAY> include the following additional
8 extensions. They are B<OPTIONAL> and applications and middleware
9 components B<SHOULD> check if they exist in the environment before
10 using the functionality provided.
11
12 =over 4
13
14 =item *
15
16 C<psgix.io>: The raw IO socket to access the client connection to do
17 low-level socket operations. This is only available in PSGI servers
18 that run as an HTTP server, and should be used when (and only when)
19 you want to I<jailbreak> out of PSGI abstraction, to implement
20 protocols over HTTP such as BOSH or WebSocket.
21
22 =item *
23
24 C<psgix.input.buffered>: A boolean which is true if the HTTP request
25 body (for POST or PUT requests) is buffered using a temporary
26 filehandle or PerlIO in C<psgi.input>. When this is set, applications
27 or middleware components can safely C<read> from C<psgi.input> without
28 worrying about non-blocking I/O and then can call C<seek> to rewind
29 the input for the transparent access.
30
31 =item *
32
33 C<psgix.logger>: A code reference to log messages. The code reference
34 is passed one argument as a hash reference that represents a message
35 to be logged. The hash reference B<MUST> include at least two keys:
36 C<level> and C<message> where C<level> B<MUST> be one of the following
37 strings: C<debug>, C<warn>, C<info>, C<error> and C<fatal>. C<message>
38 B<SHOULD> be a plain string or a scalar variable that stringifies.
39
40 =item *
41
42 C<psgix.session>: A hash reference for storing and retrieving session
43 data. Updates made on this hash reference B<SHOULD> be persisted by
44 middleware components and B<SHOULD> be restored in the succeeding
45 requests. How to persist and restore session data, as well as how to
46 identify the requesting clients are implementation specific.
47
48 C<psgix.session.options>: A hash reference to tell Middleware
49 components how to manipulate session data after the request.
50 Acceptable keys and values are implementation specific.
51
52 =item *
53
54 C<psgix.harakiri>: A boolean which is true if the PSGI server supports
55 harakiri mode, that kills a worker (typically a forked child process)
56 after the current request is complete.
57
58 C<psgix.harakiri.commit>: A boolean which is set to true by the PSGI
59 application or middleware when it wants the server to kill the worker
60 after the current request.
61
62 =back
63
64 =head1 COPYRIGHT AND LICENSE
65
66 Copyright Tatsuhiko Miyagawa, 2009-2011.
67
68 This document is licensed under the Creative Commons license by-sa.
69
70 =cut
Something went wrong with that request. Please try again.