This file is indexed.

/usr/lib/perl5/APR/Request/Param.pod is in libapache2-request-perl 2.13-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
=head1 NAME

APR::Request::Param - wrapper for libapreq2's param API.


=begin testing
    use APR::Pool;
    use APR::Brigade;
    use APR::Bucket;
    use APR::BucketAlloc;
    use APR::Request;
    use APR::Request::Parser;
    $pool = APR::Pool->new;
    $ba = APR::BucketAlloc->new($pool);
    $bb = APR::Brigade->new($pool, $ba);
    $content = <<EOT;
---XYZ-
Content-Disposition: form-data; name="alpha"
Content-Type: text/plain; charset=us-ascii

first
---XYZ-
Content-Disposition: form-data; name="beta" filename="foo.txt"
Content-Type: text/plain; charset=us-ascii

second
---XYZ-
Content-Disposition: form-data; name="gamma"
Content-Type: text/plain; charset=us-ascii

third
---XYZ---
EOT
    s/(?<!\015)\012/\015\012/g for $content;
    $bb->insert_tail(APR::Bucket->new($ba, $content));
    $parser = APR::Request::Parser->multipart($pool, $ba,
                                    "multipart/form-data; boundary=-XYZ-");
    $req = APR::Request::Custom->handle($pool, "alpha=arg1&beta=arg2",
                                                "foo=bar",
                                                $parser, 1e6, $bb);

=end testing




=head1 SYNOPSIS


=for example begin

  use APR::Request::Param;

  $arg1 = $req->args('alpha');
  $body = $req->body;
  $body->param_class("APR::Request::Param");
  ok $_->isa("APR::Request::Param") for values %$body;

  @uploads = grep {$_->upload} values %$body;
  $param = $body->get('beta');
  $param->upload_slurp(my $content);


=for example end

=for example_testing
  is $arg1, "arg1", 'alpha arg is "arg1"';
  ok @uploads == 1;
  is $content, "second", 'contents of upload_slurp'; 



=head1 DESCRIPTION

The C<< APR::Request::Param >> module provides base methods
for interfacing with libapreq2's param API.  It also provides
a few utility functions and constants.

This manpage documents version 2.13
of the APR::Request::Param, APR::Request::Brigade,
and APR::Request::Brigade::IO packages.


=head1 OVERLOADS

APR::Request::Param




=head2 ""

    "$param"

The double-quote interpolation operator maps to
C<< APR::Request::Param::value() >>.

=for example begin

=for example end

=for example_testing
    is "$param", $param->value, "quotes";




=head1 METHODS

APR::Request::Param




=head2 name

    $param->name()

Returns the param's name.
This attribute cannot be modified.

=for example begin

=for example end

=for example_testing
    is $param->name, "beta", "name";




=head2 value

    $param->value()

Returns the param's value.
This attribute cannot be modified.

=for example begin

=for example end

=for example_testing
    is $param->value, "foo.txt", "value";




=head2 is_tainted

    $param->is_tainted()
    $param->is_tainted($set)


Get/set the param's internal tainted flag.
Note: if the param's charset is APREQ_CHARSET_UTF8 (8),
this also activates the SvUTF8_on flag during calls
to name() and/or value().

=for example begin

    $tainted = $param->is_tainted;
    $param->is_tainted(0);
    ok $param->is_tainted == 0;

=for example end

=for example_testing
    $param->is_tainted($tainted);
    is $param->is_tainted, $tainted, "tainted";




=head2 charset

    $param->charset()
    $param->charset($set)

Get/set the param's internal charset.  The charset
is a number between 0 and 255; the current recognized
values are

=over 4

=item 0 APREQ_CHARSET_ASCII    (7-bit us-ascii)

=item 1 APREQ_CHARSET_LATIN1   (8-bit iso-8859-1)

=item 2 APREQ_CHARSET_CP1252   (8-bit Windows-1252)

=item 8 APREQ_CHARSET_UTF8     (utf8 encoded Unicode)

=back

See L<is_tainted> above for info about how APREQ_CHARSET_UTF8
relates to perl's UTF-8 flag.

=for example begin

    $charset = $param->charset;
    $param->charset(2);
    ok $param->charset == 2;

=for example end

=for example_testing
    $param->charset($charset);
    is $param->charset, $charset, "charset";




=head2 make

    APR::Request::Param->make($pool, $name, $value)

Fast XS param constructor.




=head2 info

    $param->info()
    $param->info($set)

Get/set the APR::Table headers for this param.




=head2 upload

    $param->upload()
    $param->upload($set)

Get/set the APR::Brigade file-upload content for this param.




=head2 upload_filename

    $param->upload_filename()

Returns the client-side filename associated with this param.




=head2 upload_link

    $param->upload_link($path)

Links the file-upload content with the local file named C<< $path >>.
Creates a hard-link if the spoolfile's (see L<upload_tempname>)
temporary directory is on the same device as C<< $path >>;
otherwise this writes a copy.




=head2 upload_slurp

    $param->upload_slurp($data)

Reads the entire file-upload content into C<< $data >>.




=head2 upload_size

    $param->upload_size()

Returns the size of the param's file-upload content.




=head2 upload_type

    $param->upload_type()

Returns the MIME-type of the param's file-upload content.




=head2 upload_tempname

    $param->upload_tempname()

Returns the name of the local spoolfile for this param.




=head2 upload_io

    $param->upload_io()

Returns an L<APR::Request::Brigade::IO> object, which can
be treated as a non-seekable IO stream.




=head2 upload_fh


    $param->upload_fh()

Returns a seekable filehandle representing the file-upload content.




=head1 METHODS

APR::Request::Brigade

This class is derived from APR::Brigade, providing additional
methods for TIEHANDLE, READ and READLINE.  To be memory efficient,
these methods delete buckets from the brigade as soon as their
data is actually read, so you cannot C<seek> on handles tied to
this class.  Such handles have semantics similar to that of a
read-only socket.




=head2 new, TIEHANDLE

    APR::Request::Brigade->TIEHANDLE($bb)

Creates a copy of the bucket brigade represented by $bb, and
blesses that copy into the APR::Request::Brigade class.  This
provides syntactic sugar for using perl's builtin C<read>, C<readline>,
and C<< <> >> operations on handles tied to this package:

=for example begin

    use Symbol;
    $fh = gensym;
    tie *$fh, "APR::Request::Brigade", $bb;
    print while <$fh>;

=for example end



=head2 READ

    $bb->READ($contents)
    $bb->READ($contents, $length)
    $bb->READ($contents, $length, $offset)

Reads data from the brigade $bb into $contents.  When omitted
$length defaults to C<-1>, which reads the first bucket into $contents.
A positive $length will read in $length bytes, or the remainder of the
brigade, whichever is greater. $offset represents the index in $context
to read the new data.




=head2 READLINE

    $bb->READLINE()

Returns the first line of data from the bride. Lines are terminated by
linefeeds (the '\012' character), but we may eventually use C<$/> instead.



=head1 METHODS

APR::Request::Brigade::IO




=head2 read

OO interface to APR::Request::Brigade::READ.




=head2 readline


OO interface to APR::Request::Brigade::READLINE.




=head1 SEE ALSO

L<APR::Request>, L<APR::Table>, L<APR::Brigade>.




=head1 COPYRIGHT

  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.