~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy-updates

« back to all changes in this revision

Viewing changes to docs/api/Apache/Response.pod

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=head1 NAME
 
2
 
 
3
Apache::Response - Perl API for Apache HTTP request response methods
 
4
 
 
5
 
 
6
 
 
7
 
 
8
=head1 Synopsis
 
9
 
 
10
  use Apache::Response ();
 
11
 
 
12
META: to be completed
 
13
 
 
14
 
 
15
 
 
16
 
 
17
=head1 Description
 
18
 
 
19
META: to be completed
 
20
 
 
21
 
 
22
 
 
23
 
 
24
=head1 API
 
25
 
 
26
C<Apache::Response> provides the following functions and/or methods:
 
27
 
 
28
 
 
29
 
 
30
 
 
31
=head2 C<custom_response>
 
32
 
 
33
META: Autogenerated - needs to be reviewed/completed
 
34
 
 
35
Install a custom response handler for a given status
 
36
 
 
37
  $r->custom_response($status, $string);
 
38
 
 
39
=over 4
 
40
 
 
41
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
42
 
 
43
The current request
 
44
 
 
45
=item arg1: C<$status> (integer)
 
46
 
 
47
The status for which the custom response should be used
 
48
 
 
49
=item arg2: C<$string> (string)
 
50
 
 
51
The custom response.  This can be a static string, a file
 
52
or a URL
 
53
 
 
54
=item ret: no return value
 
55
 
 
56
=back
 
57
 
 
58
 
 
59
 
 
60
 
 
61
 
 
62
=head2 C<make_etag>
 
63
 
 
64
META: Autogenerated - needs to be reviewed/completed
 
65
 
 
66
Construct an entity tag from the resource information.  If it's a real
 
67
file, build in some of the file characteristics.
 
68
 
 
69
  $etag = $r->make_etag($force_weak);
 
70
 
 
71
=over 4
 
72
 
 
73
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
74
 
 
75
The current request
 
76
 
 
77
=item arg1: C<$force_weak> (number)
 
78
 
 
79
Force the entity tag to be weak - it could be modified
 
80
again in as short an interval.
 
81
 
 
82
=item ret: C<$etag> (string)
 
83
 
 
84
The entity tag
 
85
 
 
86
=back
 
87
 
 
88
 
 
89
 
 
90
 
 
91
 
 
92
=head2 C<meets_conditions>
 
93
 
 
94
META: Autogenerated - needs to be reviewed/completed
 
95
 
 
96
Implements condition GET rules for HTTP/1.1 specification.  This function
 
97
inspects the client headers and determines if the response fulfills
 
98
the requirements specified.
 
99
 
 
100
  $ret = $r->meets_conditions();
 
101
 
 
102
=over 4
 
103
 
 
104
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
105
 
 
106
The current request
 
107
 
 
108
=item ret: C<$ret> (integer)
 
109
 
 
110
1 if the response fulfills the condition GET rules, 0 otherwise
 
111
 
 
112
=back
 
113
 
 
114
 
 
115
 
 
116
 
 
117
 
 
118
=head2 C<rationalize_mtime>
 
119
 
 
120
META: Autogenerated - needs to be reviewed/completed
 
121
 
 
122
Return the latest rational time from a request/mtime pair.  Mtime is
 
123
returned unless it's in the future, in which case we return the current time.
 
124
 
 
125
  $rat_mtime = $r->rationalize_mtime($mtime);
 
126
 
 
127
=over 4
 
128
 
 
129
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
130
 
 
131
The current request
 
132
 
 
133
=item arg1: C<$mtime> (number)
 
134
 
 
135
The last modified time
 
136
 
 
137
=item ret: C<$rat_mtime> (number)
 
138
 
 
139
the latest rational time.
 
140
 
 
141
=back
 
142
 
 
143
 
 
144
 
 
145
 
 
146
 
 
147
=head2 C<send_error_response>
 
148
 
 
149
META: Autogenerated - needs to be reviewed/completed
 
150
 
 
151
Send error back to client.
 
152
 
 
153
  $r->send_error_response($recursive_error);
 
154
 
 
155
=over 4
 
156
 
 
157
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
158
 
 
159
The current request
 
160
 
 
161
=item arg1: C<$recursive_error> (string)
 
162
 
 
163
last arg indicates error status in case we get an error in the process
 
164
of trying to deal with an C<ErrorDocument> to handle some other error.
 
165
In that case, we print the default report for the first thing that
 
166
went wrong, and more briefly report on the problem with the
 
167
C<ErrorDocument>.
 
168
 
 
169
=item ret: no return value
 
170
 
 
171
=back
 
172
 
 
173
 
 
174
 
 
175
 
 
176
 
 
177
=head2 C<send_mmap>
 
178
 
 
179
META: Autogenerated - needs to be reviewed/completed
 
180
 
 
181
Send an MMAP'ed file to the client
 
182
 
 
183
  $ret = $r->send_mmap($mm, $offset, $length);
 
184
 
 
185
=over 4
 
186
 
 
187
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
188
 
 
189
The current request
 
190
 
 
191
=item arg1: C<$mm> (C<L<APR::Mmap|docs::2.0::api::APR::Mmap>>)
 
192
 
 
193
The MMAP'ed file to send
 
194
 
 
195
=item arg2: C<$offset> (number)
 
196
 
 
197
The offset into the MMAP to start sending
 
198
 
 
199
=item arg3: C<$length> (integer)
 
200
 
 
201
The amount of data to send
 
202
 
 
203
=item ret: C<$ret> (integer)
 
204
 
 
205
The number of bytes sent
 
206
 
 
207
=back
 
208
 
 
209
 
 
210
 
 
211
 
 
212
 
 
213
=head2 C<set_content_length>
 
214
 
 
215
META: Autogenerated - needs to be reviewed/completed
 
216
 
 
217
Set the content length for this request.
 
218
 
 
219
  $r->set_content_length($length);
 
220
 
 
221
=over 4
 
222
 
 
223
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
224
 
 
225
The current request
 
226
 
 
227
=item arg1: C<$length> (integer)
 
228
 
 
229
The new content length
 
230
 
 
231
=item ret: no return value
 
232
 
 
233
=back
 
234
 
 
235
 
 
236
 
 
237
 
 
238
 
 
239
=head2 C<set_etag>
 
240
 
 
241
META: Autogenerated - needs to be reviewed/completed
 
242
 
 
243
Set the E-tag outgoing header
 
244
 
 
245
  $r->set_etag();
 
246
 
 
247
=over 4
 
248
 
 
249
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
250
 
 
251
=item ret: no return value
 
252
 
 
253
=back
 
254
 
 
255
 
 
256
 
 
257
 
 
258
 
 
259
=head2 C<set_keepalive>
 
260
 
 
261
META: Autogenerated - needs to be reviewed/completed
 
262
 
 
263
Set the keepalive status for this request
 
264
 
 
265
  $ret = $r->set_keepalive();
 
266
 
 
267
=over 4
 
268
 
 
269
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
270
 
 
271
The current request
 
272
 
 
273
=item ret: C<$ret> (integer)
 
274
 
 
275
1 if keepalive can be set, 0 otherwise
 
276
 
 
277
=back
 
278
 
 
279
 
 
280
 
 
281
 
 
282
 
 
283
=head2 C<update_mtime>
 
284
 
 
285
META: Autogenerated - needs to be reviewed/completed
 
286
 
 
287
Function to set the r-E<gt>mtime field to the specified value if it's
 
288
later than what's already there.
 
289
 
 
290
  $r->update_mtime($dependency_mtime);
 
291
 
 
292
=over 4
 
293
 
 
294
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
295
 
 
296
The current request
 
297
 
 
298
=item arg1: C<$dependency_mtime> (number)
 
299
 
 
300
=item ret: no return value
 
301
 
 
302
=back
 
303
 
 
304
 
 
305
 
 
306
 
 
307
 
 
308
=head2 C<set_last_modified>
 
309
 
 
310
META: Autogenerated - needs to be reviewed/completed
 
311
 
 
312
 
 
313
 
 
314
  $r->set_last_modified($mtime);
 
315
 
 
316
=over 4
 
317
 
 
318
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
319
 
 
320
=item arg1: C<$mtime> (number)
 
321
 
 
322
=item ret: no return value
 
323
 
 
324
=back
 
325
 
 
326
 
 
327
 
 
328
 
 
329
 
 
330
=head2 C<send_cgi_header>
 
331
 
 
332
META: Autogenerated - needs to be reviewed/completed
 
333
 
 
334
 
 
335
 
 
336
  $r->send_cgi_header($buffer);
 
337
 
 
338
=over 4
 
339
 
 
340
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
 
341
 
 
342
=item arg1: C<$buffer> (string)
 
343
 
 
344
=item ret: no return value
 
345
 
 
346
=back
 
347
 
 
348
 
 
349
 
 
350
 
 
351
=head1 See Also
 
352
 
 
353
L<mod_perl 2.0 documentation|docs::2.0::index>.
 
354
 
 
355
 
 
356
 
 
357
 
 
358
=head1 Copyright
 
359
 
 
360
mod_perl 2.0 and its core modules are copyrighted under
 
361
The Apache Software License, Version 1.1.
 
362
 
 
363
 
 
364
 
 
365
 
 
366
=head1 Authors
 
367
 
 
368
L<The mod_perl development team and numerous
 
369
contributors|about::contributors::people>.
 
370
 
 
371
=cut
 
372