File: FHandle.pm

package info (click to toggle)
libapache-filter-perl 1.024-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 248 kB
  • ctags: 62
  • sloc: perl: 901; makefile: 32
file content (23 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Apache::FHandle;

# This tests the 'handle' parameter of filter_input()

use strict;
use Apache::Constants qw(:common);

sub handler {
  my $r = shift->filter_register;
  $r->send_http_header;
  
  local *FH;
  my $file = $r->document_root . $r->path_info;
  open FH, $file;
  #my ($fh, $status) = $r->filter_input(handle=>\*FH);
  #return $status unless $status == OK;
  
  print <FH>;
  
  return OK;
}
1;